-
Notifications
You must be signed in to change notification settings - Fork 10
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
Allow content-security-policy headers to be defined #28
Comments
I started having a play with this in the HTPPFileUploadComponent, but something I'm doing is refusing to use the default. |
Oh, I missed this completely. In the component, I raised and fixed guusdk/httpfileuploadcomponent#46 which got released as its 1.7.0 version. In #62 this release got included in this plugin, which was then released as version 1.4.0. My fix was very blunt: just a hard-coded value. Yours seems more versatile. |
@Fishbowler I'm not reproducing your problem, I think. I've rebased your branch to the current master, and connected the resulting application to a local instance of Openfire. Without any configuration (apart from the configuration needed to make it connect to Openfire), I can use a client to upload an image. When I then look at that image in a browser, I seem to get the default CSP header values: I had problem setting this option (to make it use anything but the default). This is because the option definition does not allow for an argument (which is thus being ignored if it's provided). To fix this, change: options.addOption(
Option.builder()
.longOpt( "contentSecurityPolicy" )
.desc( "The value of the Content-Security-Policy header that is returned by the servlet. Defaults to 'default-src 'none'; frame-ancestors 'none';'." )
.build()
); into options.addOption(
Option.builder()
.longOpt( "contentSecurityPolicy" )
.hasArg()
.desc( "The value of the Content-Security-Policy header that is returned by the servlet. Defaults to 'default-src 'none'; frame-ancestors 'none';'." )
.build()
); |
The specification suggests that content-security-policy HTTP headers are added to GET requests.
The text was updated successfully, but these errors were encountered: