I have a web application server reverse-proxied behind nginx 1.15 like so:
location / {
proxy_pass https://some.awesome.IP:8080;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $remote_addr;
}
add_header Content-Security-Policy "default-src 'self'; frame-ancestor https://subdomain.domain.org 'self'";
Now this web application server thinks it would be a good idea to set the Content-Security-Policy
header to frame-ancestors 'self'
- which destroys my front-end since I need to wrap that page in an iframe being hosted at https://subdomain.domain.org
.
So, how can I in nginx change/overwrite/delete headers coming back from web application server before passing the response to the client? add_header
is obviously ignored here.