retspen / webvirtcloud

WebVirtCloud is virtualization web interface for admins and users
1.67k stars 371 forks source link

Fixed nginx X-Forwarded-Proto to match the protocol ("http", "https") #617

Closed 0x6d61726b closed 11 months ago

0x6d61726b commented 11 months ago

According to the specification of X-Forwarded-Proto, the value shall match the used protocol (e.g., "http", "https") which is provided as scheme variable in nginx.

0x6d61726b commented 11 months ago

After my browser cache has expired, Gunicorn webserver returned a "Contradictory scheme headers" error. According to https://github.com/benoitc/gunicorn/issues/1857 Gunicorn uses the X-Forwarded-Proto value as protocol used between the proxy and itself, whereas X-Forwarded-Proto is defined as protocol between client and proxy.