Skip to content
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

Not able to add CSP Headers with single quotes #187

Open
omeryesil opened this issue Mar 26, 2024 · 1 comment
Open

Not able to add CSP Headers with single quotes #187

omeryesil opened this issue Mar 26, 2024 · 1 comment

Comments

@omeryesil
Copy link

Issue
We are not able to add CSP headers that contains single quotes. Example:
nginx.ingress.kubernetes.io/configuration-snippet: >
more_set_headers "Content-Security-Policy: upgrade-insecure-requests;default-src 'self';" ;
...

I did remove ' from annotation-value-word-blocklist in nginx configmap, but it keeps getting reverted to default values after restarting nginx deployment.

I do understand single quote is blocked because of security, but, I couldn't find another way to add CSP header.

Proposal
We should be able to overwrite nginx configmap.

@sabbour
Copy link

sabbour commented Apr 3, 2024

The ' is blocked for security reasons.
Also see these open issues: kubernetes/ingress-nginx#7937 and kubernetes/ingress-nginx#7811.
I'd wait for this to merge before committing to any solution: kubernetes/ingress-nginx#9742

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants