0

Here is part of my location config:

        location /web {
                proxy_pass http://192.168.1.141:8079/gateway/web;
                add_header "TEST" 1;
                proxy_pass_request_headers      on;
                if ($request_method ~* "(GET|POST)") {
                add_header "Access-Control-Allow-Origin"  *;
                add_header "TEST" 1;
                }
                if ($request_method = OPTIONS ) {
                add_header "Access-Control-Allow-Origin"  *;
                add_header "TEST" 1;
                add_header "Access-Control-Allow-Methods" "GET, POST, OPTIONS, HEAD";
                add_header "Access-Control-Allow-Headers" "Origin, X-Requested-With, Content-Type, Accept";
                return 200;
   }

I'm trying to configure to add TEST header to every request which will be done beyond /web, thus if link will contain "/web", add TEST header in all requests,i.e.

/web/mail/*
/web/auth/*
/web/people/*
user37033
  • 379
  • 1
  • 6
  • 18
  • Solved with this this: https://stackoverflow.com/questions/19751313/forward-request-headers-from-nginx-proxy-server – user37033 Mar 14 '19 at 07:31

0 Answers0