waschinski / photo-stream

Self-hosted, super simple photo stream
https://github.com/waschinski/photo-stream
MIT License
452 stars 71 forks source link

Issue with direct links behind reverse proxy #55

Open tsrats opened 1 year ago

tsrats commented 1 year ago

Hello!

I am currently running the docker image from docker hub in kubernetes, behind a reverse proxy, and have discovered an issue that I know how to work around, but do not know how to fix. If I copy a URL to a photo (https://photos.altheashaheen.com/r0000336) and open that link directly, it will not resolve properly to my hostname for the proxy. It will redirect to my internal hostname (which is not publically accessible), and fail. If I do a curl to get the contents of the URL, it is a redirect, without the domain:

tsrats@macbookpro ~ % curl https://photos.altheashaheen.com/r0000336
<HTML><A HREF="/r0000336/">/r0000336/</A>.</HTML>

However, if I add a / to the end of the URL (https://photos.altheashaheen.com/r0000336/), then it works a-ok. I believe this is probably something to do with how Jekyll builds the site, but I am not familar with Jekyll so I don't know what I can do to fix that.

Any help would be greatly appreciated!

Thanks!