0

I am running an NGINX server pointing to my proxy server which is running on Node. I am redirecting to app/ from node using express redirect. I am also passing a custom header using res.set("X-Custom-Header","XXX"); before the redirect. But the same header is not retrieved on app/ route on NGINX. Is there anything I am missing?

2
  • You are setting a response header. This is not the same as the request headers that are received by nginx from the client. Commented May 13, 2017 at 13:34
  • Is there a way to retrieve this in nginx route as I need to check few conditional statements based on the response header Commented May 13, 2017 at 13:43

1 Answer 1

1

By default, nginx does not pass headers containing underscores.

Try:

underscores_in_headers on;

See this document for details.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.