how to install nginx_substitutions_filter in existing Nginx

Francis Daly francis at
Wed Jun 21 22:09:48 UTC 2017

On Sun, Jun 18, 2017 at 09:59:43PM -0400, David Woodstuck wrote:

Hi there,

> I have a host Nginx server running in port: 9000, This Nginx will proxy
> Some pages from
> have a lot of iframes whose srcs are
> and I cannot
> get access to,
> and I want the pages from
> to have CORS( add_header
> 'Access-Control-Allow-Origin' '*').  How do I achieve this?

You have nginx on port 9000 which does "proxy_pass;".

You want responses from the upstream port 10085 to include this extra header.

Put "add_header Access-Control-Allow-Origin *;" in the same location{}
as the proxy_pass.

You can test, using something like "curl -v", to confirm that the response
to a request to port 9000 does not refer to port 10085 at all, and that
it includes the extra header.

Francis Daly        francis at

More information about the nginx mailing list