You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi @astrowild99 Thanks for working on reverse-proxy/base-path support. The direction makes sense, but I think you need to fix a few cases before this can be merged.
With BASE_PATH=/fuxa, some paths still look broken:
The refresh cookie path is still hardcoded to /api/refresh in server/api/auth/index.js. Since the endpoint becomes /fuxa/api/refresh, the browser will not send the cookie and enableRefreshCookieAuth will break under a base path. Please update both setRefreshCookie() and clearRefreshCookie() to use the normalized base path.
Snapshot image URLs are still generated as root-relative /snapshots... in client/src/app/gauges/controls/html-image/html-image.component.ts, while the server now mounts them at BASE_PATH + '/snapshots'. Please build these URLs through the same base-path logic used by API/socket URLs.
getListenPath() currently prepends an extra / to BASE_PATH, so BASE_PATH=/fuxa logs //fuxa/.
Rewriting index.html, JS and CSS files inside settings.httpStatic at startup is risky. It can fail on read-only deployments, and it also mutates the built assets permanently: starting once with /fuxa can leave the bundle rewritten even after restarting without BASE_PATH.
Please address these before merge, ideally with a manual/tested scenario for BASE_PATH=/fuxa covering API calls, socket connection, refresh-cookie auth, and snapshot images.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📌 Description
Introducing a new ENV variable to deploy FUXA under a custom path (e.g. /fuxa) when working behind a reverse proxy.
The env variable is BASE_PATH and a working example is
BASE_PATH=/fuxa.The change keeps the current working structure, and is a runtime change, meaning that
you don't have to specify the path at compile time.
It has been tested both with docker behind an nginx proxy and on k8s with traefik ingress and
the Gateway API.
A tiny paragraph in the deploy documentation is therefore added, to explain how to work behind a reverse proxy.
🧪 Type of Change
Please mark the relevant option:
🚫 Build Artifacts Check
Please confirm:
/client/dist🔍 Checklist
📚 Documentation Checklist (if applicable)
mkdocs serveimages/example.png)mkdocs.yml(if required)📝 Additional Notes