Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 234
miticoluis Avatar asked Apr 09 '26 17:04

miticoluis


1 Answers

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

like image 164
Faisal Memon Avatar answered Apr 12 '26 08:04

Faisal Memon



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!