Skip to content

Support serving the client under the /roles/ path prefix - #872

Open
phavekes wants to merge 4 commits into
mainfrom
feature/access-dashboard-roles-path
Open

phavekes wants to merge 4 commits into
mainfrom
feature/access-dashboard-roles-path

Conversation

@phavekes

Copy link
Copy Markdown
Member

The access dashboard serves invite at /roles/. HAProxy rewrites the Host header to the invite vhost and forwards the path unchanged, so this Apache config now also accepts /roles/:

  • strips /roles/ internally (mod_rewrite, sets ROLES_PREFIX env)
  • rewrites root-relative href/src/action links in HTML responses back to /roles/ via mod_substitute (needs a2enmod substitute)

Direct access via invite./ (path /) is unchanged. Redirect Location headers are prefixed by HAProxy.

When requested via the access dashboard (Host rewritten to the invite
vhost, path /roles/...), strip the prefix internally and rewrite
root-relative href/src/action links in HTML responses back to /roles/
using mod_substitute. Requires a2enmod substitute.
Rewrite the bare /roles/ prefix straight to /index.html instead of /
(the appconf fallback to /index.html does not run after [L], and a
directory request 403s with Options -Indexes). Enable the substitute
module in the image so the response link rewriting actually applies.
With base './' the built index.html references ./assets/... which the
browser resolves against the current prefix (/ or /roles/), so no
response rewriting is needed for asset URLs.

This branch was successfully deployed

1 active deployment
deploy — 882069f4 Deployed Nov 20, 2026 by phavekes via deployment #530
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.

1 participant