mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-29 17:03:43 -05:00
Merge pull request #5838 from overleaf/jpa-fix-load-editor-metrics
[web] fix the http-request metric options for loading the editor GitOrigin-RevId: 8c87ebd5be77a918b719ddd061b4758efb277a90
This commit is contained in:
parent
2261e761f4
commit
44b3fece89
1 changed files with 19 additions and 12 deletions
|
@ -294,8 +294,14 @@ function initialize(webRouter, privateApiRouter, publicApiRouter) {
|
|||
ProjectController.newProject
|
||||
)
|
||||
|
||||
for (const route of [
|
||||
// Keep the old route for continuous metrics
|
||||
'/Project/:Project_id',
|
||||
// New route for pdf-detach
|
||||
'/Project/:Project_id/:detachRole(detacher|detached)',
|
||||
]) {
|
||||
webRouter.get(
|
||||
'/Project/:Project_id/:detachRole(detacher|detached)?',
|
||||
route,
|
||||
RateLimiterMiddleware.rateLimit({
|
||||
endpointName: 'open-project',
|
||||
params: ['Project_id'],
|
||||
|
@ -306,6 +312,7 @@ function initialize(webRouter, privateApiRouter, publicApiRouter) {
|
|||
AuthorizationMiddleware.ensureUserCanReadProject,
|
||||
ProjectController.loadEditor
|
||||
)
|
||||
}
|
||||
webRouter.head(
|
||||
'/Project/:Project_id/file/:File_id',
|
||||
AuthorizationMiddleware.ensureUserCanReadProject,
|
||||
|
|
Loading…
Reference in a new issue