Fix: add v1 to navigation fallback denylist
This is required for the Stripe redirection flowpull/751/head
parent
000a3e005c
commit
8211b4cc24
|
@ -77,6 +77,8 @@ var (
|
||||||
authPathRegex = regexp.MustCompile(`^/[-_A-Za-z0-9]{1,64}(,[-_A-Za-z0-9]{1,64})*/auth$`)
|
authPathRegex = regexp.MustCompile(`^/[-_A-Za-z0-9]{1,64}(,[-_A-Za-z0-9]{1,64})*/auth$`)
|
||||||
publishPathRegex = regexp.MustCompile(`^/[-_A-Za-z0-9]{1,64}/(publish|send|trigger)$`)
|
publishPathRegex = regexp.MustCompile(`^/[-_A-Za-z0-9]{1,64}/(publish|send|trigger)$`)
|
||||||
|
|
||||||
|
// Note: new paths that should be viewable directly in the browser should be added to web/public/sw.js's navigation fallback denyList as well
|
||||||
|
|
||||||
webConfigPath = "/config.js"
|
webConfigPath = "/config.js"
|
||||||
webManifestPath = "/manifest.webmanifest"
|
webManifestPath = "/manifest.webmanifest"
|
||||||
webRootHTMLPath = "/app.html"
|
webRootHTMLPath = "/app.html"
|
||||||
|
|
|
@ -245,10 +245,11 @@ if (!import.meta.env.DEV) {
|
||||||
// this is so we don't respond to `/` UNLESS it's the app root itself, defined above
|
// this is so we don't respond to `/` UNLESS it's the app root itself, defined above
|
||||||
/^\/.+$/,
|
/^\/.+$/,
|
||||||
],
|
],
|
||||||
// only /docs is required so it is navigable in the browser.
|
// only /docs, /file and /v1 are required so they are navigable in the browser (files for clicking on attachments,
|
||||||
// the rest are nice-to-haves so the single-page-app doesn't try to handle them, but `fetch`
|
// v1 for the redirect from Stripe). The rest are nice-to-haves so the single-page-app doesn't try to handle them,
|
||||||
// and browser requests would work anyway.
|
// but `fetch` and browser requests would work anyway – they are mainly there so inspecting them is easier than
|
||||||
denylist: [/^\/(docs|static|file).*$/, /^\/(app.html|manifest.webmanifest|sw.js|config.js)$/],
|
// calling the URLs via curl.
|
||||||
|
denylist: [/^\/(docs|file|v1|metrics|static|_matrix).*$/, /^\/(app.html|manifest.webmanifest|sw.js|config.js)$/],
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue