Skip to content

Use relative URLs to support subpath deployments - #17

Open
fjl5 wants to merge 1 commit into
grommunio:masterfrom
fjl5:relative-paths
Open

Use relative URLs to support subpath deployments#17
fjl5 wants to merge 1 commit into
grommunio:masterfrom
fjl5:relative-paths

Conversation

@fjl5

@fjl5 fjl5 commented Aug 4, 2026

Copy link
Copy Markdown
  • Add <base href="/"> in index.html as the anchor relative paths resolve against
  • Set homepage to "."
  • Replace window.location-based URL construction in api.ts/config.ts with relative paths
  • Replace manual window.location.pathname parsing with useLocation()/useParams(), avoiding a doubled subpath prefix
  • Modify SPA fallback in conf/web.conf to resolve relative to the location block

With these changes, when serving or embedding under a subpath, only <base href> needs to be adjusted

- Add <base href="/"> in index.html as the anchor relative paths
  resolve against
- Set homepage to "."
- Replace window.location-based URL construction in api.ts/config.ts
  with relative paths
- Replace manual window.location.pathname parsing with useLocation()/
  useParams(), avoiding a doubled subpath prefix
- Modify SPA fallback in conf/web.conf to resolve relative to the
  location block
- When serving or embedding under a subpath, only <base href> needs
  to be adjusted
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants