mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-24 03:33:27 +00:00
Merge pull request #8071 from overleaf/jpa-clsi-zonal
[misc] prefix output file downloads with /zone/X GitOrigin-RevId: ba59e97ae0284c68ba551dd49dc5d3daa4d61aa9
This commit is contained in:
parent
d4ed26e3ad
commit
9a71372c36
3 changed files with 10 additions and 5 deletions
|
@ -125,7 +125,7 @@ module.exports = CompileController = {
|
|||
outputFiles: outputFiles.map(file => {
|
||||
return {
|
||||
url:
|
||||
`${Settings.apis.clsi.url}/project/${request.project_id}` +
|
||||
`${Settings.apis.clsi.outputUrl}/project/${request.project_id}` +
|
||||
(request.user_id != null
|
||||
? `/user/${request.user_id}`
|
||||
: '') +
|
||||
|
|
|
@ -34,7 +34,12 @@ module.exports = {
|
|||
},
|
||||
apis: {
|
||||
clsi: {
|
||||
// Internal requests (used by tests only at the time of writing).
|
||||
url: `http://${process.env.CLSI_HOST || 'localhost'}:3013`,
|
||||
// External url prefix for output files, e.g. for requests via load-balancers.
|
||||
outputUrl: `http://${process.env.CLSI_HOST || 'localhost'}:3013${
|
||||
process.env.ZONE ? `/zone/${process.env.ZONE}` : ''
|
||||
}`,
|
||||
},
|
||||
clsiPerf: {
|
||||
host: `${process.env.CLSI_PERF_HOST || 'localhost'}:${
|
||||
|
|
|
@ -69,7 +69,7 @@ describe('CompileController', function () {
|
|||
'@overleaf/settings': (this.Settings = {
|
||||
apis: {
|
||||
clsi: {
|
||||
url: 'http://clsi.example.com',
|
||||
outputUrl: 'http://clsi.example.com',
|
||||
},
|
||||
},
|
||||
}),
|
||||
|
@ -157,7 +157,7 @@ describe('CompileController', function () {
|
|||
timings: this.timings,
|
||||
outputFiles: this.output_files.map(file => {
|
||||
return {
|
||||
url: `${this.Settings.apis.clsi.url}/project/${this.project_id}/build/${file.build}/output/${file.path}`,
|
||||
url: `${this.Settings.apis.clsi.outputUrl}/project/${this.project_id}/build/${file.build}/output/${file.path}`,
|
||||
...file,
|
||||
}
|
||||
}),
|
||||
|
@ -198,7 +198,7 @@ describe('CompileController', function () {
|
|||
timings: this.timings,
|
||||
outputFiles: this.output_files.map(file => {
|
||||
return {
|
||||
url: `${this.Settings.apis.clsi.url}/project/${this.project_id}/build/${file.build}/output/${file.path}`,
|
||||
url: `${this.Settings.apis.clsi.outputUrl}/project/${this.project_id}/build/${file.build}/output/${file.path}`,
|
||||
...file,
|
||||
}
|
||||
}),
|
||||
|
@ -240,7 +240,7 @@ describe('CompileController', function () {
|
|||
timings: this.timings,
|
||||
outputFiles: this.output_files.map(file => {
|
||||
return {
|
||||
url: `${this.Settings.apis.clsi.url}/project/${this.project_id}/build/${file.build}/output/${file.path}`,
|
||||
url: `${this.Settings.apis.clsi.outputUrl}/project/${this.project_id}/build/${file.build}/output/${file.path}`,
|
||||
...file,
|
||||
}
|
||||
}),
|
||||
|
|
Loading…
Reference in a new issue