miticoluis
miticoluis

Reputation: 531

force nginx to write an empty/blank http authorization request header

I want my Nginx server to inject a blank/empty Authorization request header i.e. "authorization": ""

I'm trying to use:

proxy_set_header Authorization '';

Unfortunately the previous directive doesn't set any request header, Is this possible to do?. I need to be able to set its value to an empty string.

Upvotes: 3

Views: 3821

Answers (1)

Faisal Memon
Faisal Memon

Reputation: 1107

That might not be possible with NGINX. From proxy_set_header definition:

If the value of a header field is an empty string then this field will not be passed to a proxied server

Upvotes: 4

Related Questions