F
F
Fr05t1k2015-04-26 23:27:15
Nginx
Fr05t1k, 2015-04-26 23:27:15

How to apply proxy_set_header only for certain IPs?

It is necessary to override the Authorization header for certain IP addresses, and skip all others with the passed header. Can this be done via config?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
Fr05t1k, 2015-04-27
@Fr05t1k

if ($remote_addr = 194.172.2.115) {
  set $phead $http_authorization;
    }

Further on the config
proxy_set_header Authorization $phead;

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question