mirror of
https://github.com/pocket-id/pocket-id.git
synced 2025-12-09 14:53:00 +03:00
🚀 Feature: Reverse-proxy on a subpath #355
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @drzezga on GitHub.
Feature description
It seems there is currently no way to configure pocket-id to work inside a reverse-proxy on a subpath.
When I configure nginx to route pocket-id through the
/pocket-id/path and configure pocket-id to use this subpath, it gets ignored and all URLs still lead to/. This makes the web interface unusable, as it either redirects to/login(which 404s) or opens a blank error page with broken URLs.In all examples I was able to find, pocket-id runs on the root of the domain - the demo, the caddyfile, the user management page, etc.
Pitch
It would be really useful if this could be done. Some deployments require all services to be accessible through only one domain. The way it's currently implemented, nothing else can be hosted on the
/path except pocket-id.When the PUBLIC_APP_URL env var is set to a subpath of a domain, this feature should be enabled and the correct path should be used.
If this behaviour is intentional and is a security consideration, I would appreciate learning about it.
@stonith404 commented on GitHub:
I’m not sure if implementing this makes sense. Running services on a subpath, rather than a subdomain, isn’t generally recommended and could add complexity in both implementation and maintenance.
From a security perspective, if services manage cookies correctly, it shouldn’t be a major issue. However, it would be possible that another service overwrites Pocket ID’s cookies.
Could you share more details on your use case? What’s the advantage of running multiple services on the same domain rather than using subdomains?