-
Notifications
You must be signed in to change notification settings - Fork 30
feat: add subpath route support #60
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
base: main
Are you sure you want to change the base?
Changes from 3 commits
7862cc7
94532c4
64694cd
143d976
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -46,7 +46,7 @@ export const Route = createRootRoute({ | |
| }, | ||
| { | ||
| rel: 'icon', | ||
| href: '/favicon.ico', | ||
| href: `${import.meta.env.VITE_BASE_PATH || ''}/favicon.ico`, | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When Useful? React with 👍 / 👎. |
||
| }, | ||
| ], | ||
| }), | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -347,13 +347,10 @@ export const openidLoginFn = createServerFn({ method: 'GET' }).handler(async () | |
| try { | ||
| const baseUrl = getApiBaseUrl(); | ||
| const authUrl = new URL(`${baseUrl}/api/admin/oauth/openid`); | ||
| const requestOrigin = getRequestOrigin(); | ||
|
|
||
| const codeVerifier = crypto.randomBytes(32).toString('hex'); | ||
| const codeChallenge = crypto.createHash('sha256').update(codeVerifier).digest('hex'); | ||
| authUrl.searchParams.set('code_challenge', codeChallenge); | ||
| if (requestOrigin) | ||
| authUrl.searchParams.set('redirect_uri', `${requestOrigin}/auth/openid/callback`); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. SSO redirect_uri removed instead of made subpath-awareMedium Severity The Reviewed by Cursor Bugbot for commit 143d976. Configure here. |
||
|
|
||
| const session = await useAppSession(); | ||
| await session.update({ codeVerifier }); | ||
|
|
||


There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In subpath deployments (for example
VITE_BASE_PATH=/adminpanel), this passes/adminpanel/...intowithHttpMetrics, butnormalizeMetricsPathonly maps unprefixed app routes like/loginand/configuration. As a result, most application page hits are relabeled asunknown, which regresses per-route observability introduced by this feature. StripBASE_PATHfromurl.pathname(or normalize it) before recording metrics.Useful? React with 👍 / 👎.