-
-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Host from subpath #95
Comments
Yeah there's a few issues regarding this. Working on a fix |
Any update on this? |
Hi, any update on this? I'm trying to run it behind a reverse proxy but cannot make it work... |
I've looked into this several times and just took another stab at it but it's a lot more complicated problem than it might seem due to the frameworks I've decided to use. Looking at other open source web apps they also often don't seem to support hosting from subpaths for the same reasons, it's overly complex to implement. Instead you should just host it from a subdomain, like you should. Hosting from a sub path also has security implications. Why can't you use subdomains? |
Hosting the app via a proxy under a different hostname requires additional steps and adds external dependencies which might break under certain circumstances, namely
Having spoolman listen to a different basePath would make it possible to access it in any given way, no matter the external circumstances. Analogue to having it listen to a specific port without having to remember the port number. I'd like to ship spoolman with prind, which is using a proxy for the web frontends as well as moonraker endpoints under the same hostname. Could you elaborate which security implications this would have? |
I would also like to see this implemented, though I understand that it's not as straightforward as it sounds. I would like to be able to access Spoolman without an IP:port. My current setup makes this difficult to do without making the service accessible from the internet, and I would like to keep it only accessible over VPN. |
I have now pushed a commit that fixes this. If you use docker you can test it out by running the Set the base path using the |
There are now instructions at the bottom of the README for how to run spoolman from source in a non-docker way. |
Hi there,
I'd like to host spoolman Api and the Frontend via a proxy under a subpath e.g. http://host/spoolman
Looking at the fastapi documentation (https://fastapi.tiangolo.com/advanced/behind-a-proxy/) this should be possible by adding the
--root-path
parameter when starting uvicorn but I had no success with that.This is the example setup I used for testing:
When navigating to http://localhost/spoolman, a blank white page is presented w/ the titlebar showing
Spoolman
.The Webapp does not seem to honor the altered root path and requests files from
/
instead of/spoolman
.Api requests get forwarded to the frontend, which is also not the desired behaiour.
To rule out a misconfiguration of the proxy, I tried to access the container directly via its port.
When accessing http://localhost:8000/spoolman, the frontend loads and shows a 404, while a request to the api behaves the same way as described above.
Any guidance on how to achive this, or does this require code changes?
-Markus
The text was updated successfully, but these errors were encountered: