2

I have an interesting problem I need to solve in nginx: one of the sites I'm building receives inbound traffic on port 80 (and only port 80) which may have a certain header set in the request. If this header is present I need to capture the value of it and append that as a querystring parameter before doing a temporary redirect (rewrite) to a different (secure) server, while passing the paramater and any other querystring params along. This should be very doable, but how!?

Many thanks,

JS

John Schulze
  • 73
  • 1
  • 6

1 Answers1

2
return https://example.com$uri?my_header=$http_my_header&$args;

If I understand you correctly.

superhawk610
  • 103
  • 4
VBart
  • 8,159
  • 3
  • 24
  • 25