Merge pull request #6384 from overleaf/jpa-fix-proxying-of-json

[web] fix proxying of responses from other services

GitOrigin-RevId: ac1ecc02c06e353f8379fadb47824a46672610e5
This commit is contained in:
Jakob Ackermann 2022-01-17 16:00:47 +00:00 committed by Copybot
parent d720d6affa
commit 220daff655
3 changed files with 5 additions and 0 deletions

View file

@ -884,6 +884,7 @@ const ClsiManager = {
file: filename,
image: req.compile.options.imageName,
},
json: true,
method: 'GET',
}
ClsiManager._makeRequestWithClsiServerId(

View file

@ -1014,6 +1014,7 @@ describe('ClsiManager', function () {
file: 'rootfile.text',
image: undefined,
},
json: true,
},
'node-1'
)
@ -1046,6 +1047,7 @@ describe('ClsiManager', function () {
method: 'GET',
url: `http://clsi.example.com/project/${this.project_id}/user/${this.user_id}/wordcount`,
qs: { file: 'main.tex', image: undefined },
json: true,
},
'node-2'
)
@ -1076,6 +1078,7 @@ describe('ClsiManager', function () {
method: 'GET',
url: `http://clsi.example.com/project/${this.project_id}/user/${this.user_id}/wordcount`,
qs: { file: 'main.tex', image: this.image },
json: true,
},
'node-3'
)

View file

@ -35,6 +35,7 @@ class MockResponse {
sinon.spy(this, 'sendStatus')
sinon.spy(this, 'status')
sinon.spy(this, 'render')
sinon.spy(this, 'redirect')
}
header(field, val) {