-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use OWIN instead of HttpModule #1
Comments
@dawoe I'm not currently 100% happy with the way Umbraco is doing the OWIN startup at the moment, because there are scenarios where things get quirky, Your example for instance, where you have your own startup class which is inheriting from UmbracoDefaultOwinStartup, you would have to inherit from our OwinStartup class. that is doable, but it adds complexity. Now say there were two packages which you wanted to use which inherited from the base OwinStartup, you would have to download the sourcecode of one of them, add a reference to the other package and then change the inheritance and build up a chain of inheritance from PackageA : Package B : OwinStartup And down the line, if someone is maintaining a site with that implementation and not aware of it. Someone will be scratching there head and going in circles trying to figure things out! What we could do to fix this is for it to become standard for everyone to have their own OwinStartup class within their sites and for package developers to expose helpers which configures their bits (much like MVC with the Global.asx where you configure routing etc in one place) |
But that scenario also is valid for HttpModules. If somebody has their own HttpModules adding one can break the site as well. I think somethings need to be changed in core to taclke these kind of scenario's. Maybe it's time that @PeteDuncanson creates a new issue ;-) |
What is this? Voice activated issue creating? I'm not a robot you know! Issues created: http://issues.umbraco.org/issue/U4-11169 :) |
Adding an HttpModule for the site + this one shouldn't break it, unless you're trying to use two different ones to add Content-Security-Policy headers. Which I'd recommend against ;) |
This week I was researching on how to generate a nonce for my inline script/css block to avoid the use of unsafe-inline and unsafe-eval
I came across this article that uses Owin to do that : https://vcsjones.com/2014/12/17/content-security-policy-nonces-in-asp-net-and-owin/
Maybe this can be used. This would allow for a nonce as well from your package.
Umbraco already has a Owin startup class defined in the web.config
So i guess it would be a matter of inheriting that one and updating the web.config with yours.
Dave
The text was updated successfully, but these errors were encountered: