Conversation
Derive the router basepath, the same-origin /api prefix, config.js and favicon URLs from import.meta.env.BASE_URL, so a build with --base /honcho/ works behind a reverse proxy. Default base stays /, so nothing changes for existing deployments. The Docker image takes a BASE_PATH build arg.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Allow hosting the web UI under a sub-path (e.g.
https://example.net/honcho/) behind a reverse proxy.basepath, the same-origin/apiprefix,config.jsand favicon URLs fromimport.meta.env.BASE_URL.pnpm --filter @openconcho/web build --base /honcho/; the Docker image accepts--build-arg BASE_PATH=/honcho/(the outer proxy strips the prefix, the image's nginx keeps serving at/)./, so existing web, Docker, Helm and Tauri builds are unchanged.docs/docker.md.Testing
pnpm check(Biome, tsc, Vitest) passes; a new test assertsAPI_PREFIXbecomes/honcho/apifor a/honcho/base.BASE_PATH=/honcho/:index.htmlreferences/honcho/assets/…and/honcho/config.js;/healthz,/config.jsand SPA deep links return 200./honcho/(staticdistviaalias,/honcho/api/proxied to Honcho).