

It forwards requests to the other server.
No raw requests are passed to Immich. All incoming data is validated / sanitized. Requests are only made to specific whitelisted API endpoints. I don’t know why you’re so angry 🤷
It forwards requests to the other server.
No raw requests are passed to Immich. All incoming data is validated / sanitized. Requests are only made to specific whitelisted API endpoints. I don’t know why you’re so angry 🤷
some dude’s personal project
Yes, it’s my project.
if I put it behind something else that forwards traffic to the server then that’s somehow safe!
It doesn’t “forward traffic”, it validates traffic and answers only valid requests, without needing privileged access to Immich. I think you are confusing the word “proxy” with meaning something like Traefik.
telling me that is more secure. As though that project is better written?
Yes, it’s more secure to use this than exposing Immich. No it’s not “better written” than Immich; it fulfills a completely different purpose.
It’s 400 lines of code in total, feel free to review it and tell me any flaws, oh mighty security expert.
Sorry, off topic, but is this what Immich looks like out of the box, or have you used any other plugins?
No - this is using lightGallery. You can see what Immich looks like on their demo.
I’m “exposing” my own server either way!
Put it on a different server then. It prevents your Immich server from ever needing to be exposed publicly. That’s the entire point.
This is stupid.
You seem to understand neither security nor privacy.
I get to give you access to all my photos so that you can just proxy calls to my server?
This is a self-hosted app… The only person who has access to your photos is you - that’s the entire point of using this.
Or you could similar just block those routes in whatever reverse proxy you’d use out in front of the server?
You can’t. You need to allow public access to your Immich instance’s /api/
path to use Immich’s built-in sharing.
You’re correct - it is indeed taking input requests and proxying them to Immich.
How is this adding more security than any other proxy?
To allow sharing with Immich using a normal reverse proxy like Caddy or Traefik, you need to expose public access to the Immich /api/
path, along with a few other potentially dangerous paths. Any existing or future vulnerability has the potential to compromise your Immich instance.
This proxy is more secure as it does not allow public access to the Immich API path or to any Immich path. The only incoming requests which are honoured are requests like this:
https://your-proxy-url.com/share/ffSw63qnIYMtpmg0RNvOui0Dpio7BbxsObjvH8YZaobIjIAzl5n7zTX5d6EDHdOYEvo
If the shared link does not resolve to something that you have intentionally shared from Immich, it will return a 404.
if Immich is updated with changes that proxy doesn’t have yet, everything breaks.
The only thing which would break it is if Immich changed the format of a few select API endpoints. And if that ever happens it’s a very easy fix.
You’d still need to allow access to the
/api/
path, and even public endpoints could potentially expose you to a vulnerability. It’s entirely up to your threat model.Knowing what happened in 2014 with iCloud, I’m not prepared to take that risk. Especially as Immich is under heavy development and things can often change and move around. At least this way I know that it will either safely fetch the data or simply fail.