mirror of
https://github.com/gristlabs/grist-core.git
synced 2024-10-27 20:44:07 +00:00
(core) update tests and endpoints after bare /urlId redirect added
Summary: * Some tests needed updating because fake document ids in tests were changed to be valid urlIds (the existing ones were too short). * urlId capture is tweaked to not allow hyphens, so some long login-related paths don't get confused with documents. Test Plan: tests should pass again Reviewers: dsagal Reviewed By: dsagal Subscribers: dsagal Differential Revision: https://phab.getgrist.com/D4134
This commit is contained in:
parent
4d9bbf6263
commit
bcb9740d89
@ -212,6 +212,6 @@ export function attachAppEndpoint(options: AttachOptions): void {
|
||||
// The * is a wildcard in express 4, rather than a regex symbol.
|
||||
// See https://expressjs.com/en/guide/routing.html
|
||||
app.get('/doc/:urlId([^/]+):remainder(*)', ...docMiddleware, docHandler);
|
||||
app.get('/:urlId([^/]{12,})(/:slug([^/]+):remainder(*))?',
|
||||
app.get('/:urlId([^-/]{12,})(/:slug([^/]+):remainder(*))?',
|
||||
...docMiddleware, docHandler);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user