According to cookie variable I need to make proxy_pass_headers, but proxy_pass_header directive is not allowed in "if". How to resolve this problem?
I tried to do this with help of predefined locations. But for colling predefined location I didn't found any opportunity except error_page 302 = @location; return 302. In this case GET requests are working fine, but on POST request I received error "upstream prematurely closed connection while reading response header from upstream". On error code 404 all working normal, but this is bad practice, I think.
Thank You for any suggestions!
I tried to do this with help of predefined locations. But for colling predefined location I didn't found any opportunity except error_page 302 = @location; return 302. In this case GET requests are working fine, but on POST request I received error "upstream prematurely closed connection while reading response header from upstream". On error code 404 all working normal, but this is bad practice, I think.
Thank You for any suggestions!