mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Merge pull request #11621 from overleaf/jpa-targeted-access-check
[web] cut down volume of user content domain access check requests GitOrigin-RevId: 42011325db9f421e8267c4d0215701dedae652f9
This commit is contained in:
parent
c4ecded316
commit
635f2969ba
1 changed files with 16 additions and 8 deletions
|
@ -132,14 +132,22 @@ export async function checkUserContentDomainAccess() {
|
|||
const userId = `0${randomHex(12).slice(1)}`
|
||||
const buildId = genBuildId()
|
||||
const zone = pickZone()
|
||||
const urls = [
|
||||
const urls = []
|
||||
if (getMeta('ol-user_id')) {
|
||||
// Logged-in user
|
||||
urls.push(
|
||||
`${getMeta(
|
||||
'ol-compilesUserContentDomain'
|
||||
)}/zone/${zone}/project/${projectId}/user/${userId}/build/${buildId}/output/output.pdf`,
|
||||
)}/zone/${zone}/project/${projectId}/user/${userId}/build/${buildId}/output/output.pdf`
|
||||
)
|
||||
} else {
|
||||
// Anonymous user
|
||||
urls.push(
|
||||
`${getMeta(
|
||||
'ol-compilesUserContentDomain'
|
||||
)}/zone/${zone}/project/${projectId}/build/${buildId}/output/output.pdf`,
|
||||
]
|
||||
)}/zone/${zone}/project/${projectId}/build/${buildId}/output/output.pdf`
|
||||
)
|
||||
}
|
||||
|
||||
const cases = []
|
||||
for (const url of urls) {
|
||||
|
|
Loading…
Reference in a new issue