How to set SELF_URL_PATH to https when using reverse proxy?

Hi,

I’m using ttrss-docker with the default web-nginx frontend and an external reverse proxy which does SSL.

This setup is working fine, however I have to set SELF_URL_PATH to http:// and was wondering if there’s any way to configure it as https:// so the links generated by tt-rss have already https and won’t depend on my reverse proxy doing a 301 redirect to the secure URL.

Thanks.

You need to set the X-Forwarded-Proto request header on your reverse proxy. On Apache it should look something like
RequestHeader set "X-Forwarded-Proto" expr=%{REQUEST_SCHEME}
and on nginx
proxy_set_header X-Forwarded-Proto $scheme;

Then set SELF_URL_PATH to https://...

That’s it. Thank you!

Aha! Lack of this was also why, despite https access already working to my new docker-compose setup, Firefox was complaining about sending data insecurely whenever I clicked through an article to the original site. Setting this header (and then tweaking SELF_URL_PATH because I still had http, not https, on that) has fixed it.

this situation seems like something that should be checked against

https://git.tt-rss.org/fox/tt-rss/commit/e6a875b7e4e4b179284942878da452a8db8d9b50