diff --git a/documentation/PROXY.md b/documentation/PROXY.md index 413b3c4c..8ff6d5a6 100644 --- a/documentation/PROXY.md +++ b/documentation/PROXY.md @@ -131,10 +131,12 @@ frontend https bind :80 bind :443 ssl crt /etc/haproxy/certs/cert_key.pem - # Add X-Headers necessary for HTTPS - # Replace frontend.example.com with your SSL host and include :[port] if not running on port 443 - reqadd X-Forwarded-Host:\ frontend.example.com - reqadd X-Forwarded-Proto:\ https + # Add X-Headers necessary for HTTPS; include :[port] if not running on port 443 + http-request set-header X-Forwarded-Host %[req.hdr(Host)] + http-request set-header X-Forwarded-Proto https + + # (OPTIONAL) Force HTTPS + redirect scheme https if !{ ssl_fc } # Bind URL with the right backend acl is_libresonic path_beg -i /libresonic @@ -146,9 +148,6 @@ backend libresonic-backend # proxy_redirect directive. http-response replace-value Location ^http://(.*)$ https://\1 - # (OPTIONAL) Force HTTPS - redirect scheme https if !{ ssl_fc } - # Forward requests to Libresonic running on localhost on port 4040 server libresonic 127.0.0.1:4040 check ```