SteveLTN / https-portal

A fully automated HTTPS server powered by Nginx, Let's Encrypt and Docker.
MIT License
4.46k stars 295 forks source link

Do forwarded for headers work? #300

Closed sr258 closed 2 years ago

sr258 commented 2 years ago

I'm thinking about replacing my current custom NGINX reverse proxy setup with https-portal.

My NGINX config sets these headers:

        proxy_set_header X-Real-IP       $proxy_protocol_addr;
        proxy_set_header X-Forwarded-For $proxy_protocol_addr;
        proxy_set_header X-Forwarded-Host XXXX

Will https-portal also set these headers? The application behind the reverse proxy relies on them being set.

SteveLTN commented 2 years ago

Some of them. See here.

sr258 commented 2 years ago

Alright, thanks for pointing me to the information. Turns out the X-Forwarded-Host is not needed when https-portal sets the host.