Welcome! Log In Create A New Profile

Advanced

change proxy_pass protocol accordingly to x-forwarded-proto

August 03, 2014 03:55AM
Hi,
I have load balancer with SSL on it that connects to nginx servers. Nginx servers simply reverse proxy site X.com.
The problem is that nginx servers don't have SSL certs and listing only to unsecured port but it forwards to https protocol.
The question is, can I change proxy_pass URL accordingly to x-forwarded-proto header?
ex:
___________
x-forwarded-proto = https {
proxy_pass https://X.com
} else {
proxy_pass http://X.com
}
_______
Thanks for any suggestions
Subject Author Posted

change proxy_pass protocol accordingly to x-forwarded-proto

confiq August 03, 2014 03:55AM

Re: change proxy_pass protocol accordingly to x-forwarded-proto

itpp2012 August 03, 2014 05:27AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 266
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready