mirror of
https://github.com/overleaf/overleaf.git
synced 2024-09-16 02:52:31 -04:00
removed priority url from proxy to clsi
This commit is contained in:
parent
c284465ba5
commit
14cbf4f1c8
2 changed files with 1 additions and 46 deletions
|
@ -115,9 +115,6 @@ module.exports = CompileController =
|
||||||
if err?
|
if err?
|
||||||
logger.err err:err, "error getting cookie jar for clsi request"
|
logger.err err:err, "error getting cookie jar for clsi request"
|
||||||
return callback(err)
|
return callback(err)
|
||||||
if limits.compileGroup == "priority"
|
|
||||||
compilerUrl = Settings.apis.clsi_priority.url
|
|
||||||
else
|
|
||||||
compilerUrl = Settings.apis.clsi.url
|
compilerUrl = Settings.apis.clsi.url
|
||||||
url = "#{compilerUrl}#{url}"
|
url = "#{compilerUrl}#{url}"
|
||||||
logger.log url: url, "proxying to CLSI"
|
logger.log url: url, "proxying to CLSI"
|
||||||
|
|
|
@ -206,16 +206,6 @@ describe "CompileController", ->
|
||||||
@CompileManager.getProjectCompileLimits = sinon.stub().callsArgWith(1, null, {compileGroup: "priority"})
|
@CompileManager.getProjectCompileLimits = sinon.stub().callsArgWith(1, null, {compileGroup: "priority"})
|
||||||
@CompileController.proxyToClsi(@project_id, @url = "/test", @req, @res, @next)
|
@CompileController.proxyToClsi(@project_id, @url = "/test", @req, @res, @next)
|
||||||
|
|
||||||
it "should proxy to the priority url if the user has the feature", ()->
|
|
||||||
@request
|
|
||||||
.calledWith(
|
|
||||||
jar:@jar
|
|
||||||
method: @req.method
|
|
||||||
url: "#{@settings.apis.clsi_priority.url}#{@url}",
|
|
||||||
timeout: 60 * 1000
|
|
||||||
)
|
|
||||||
.should.equal true
|
|
||||||
|
|
||||||
describe "user with standard priority via query string", ->
|
describe "user with standard priority via query string", ->
|
||||||
beforeEach ->
|
beforeEach ->
|
||||||
@req.query = {compileGroup: 'standard'}
|
@req.query = {compileGroup: 'standard'}
|
||||||
|
@ -239,20 +229,6 @@ describe "CompileController", ->
|
||||||
it "should bind an error handle to the request proxy", ->
|
it "should bind an error handle to the request proxy", ->
|
||||||
@proxy.on.calledWith("error").should.equal true
|
@proxy.on.calledWith("error").should.equal true
|
||||||
|
|
||||||
describe "user with priority compile via query string", ->
|
|
||||||
beforeEach ->
|
|
||||||
@req.query = {compileGroup: 'priority'}
|
|
||||||
@CompileController.proxyToClsi(@project_id, @url = "/test", @req, @res, @next)
|
|
||||||
|
|
||||||
it "should proxy to the priority url if the user has the feature", ()->
|
|
||||||
@request
|
|
||||||
.calledWith(
|
|
||||||
jar:@jar
|
|
||||||
method: @req.method
|
|
||||||
url: "#{@settings.apis.clsi_priority.url}#{@url}",
|
|
||||||
timeout: 60 * 1000
|
|
||||||
)
|
|
||||||
.should.equal true
|
|
||||||
|
|
||||||
describe "user with non-existent priority via query string", ->
|
describe "user with non-existent priority via query string", ->
|
||||||
beforeEach ->
|
beforeEach ->
|
||||||
|
@ -316,25 +292,7 @@ describe "CompileController", ->
|
||||||
it "should bind an error handle to the request proxy", ->
|
it "should bind an error handle to the request proxy", ->
|
||||||
@proxy.on.calledWith("error").should.equal true
|
@proxy.on.calledWith("error").should.equal true
|
||||||
|
|
||||||
describe "user with priority compile", ->
|
|
||||||
beforeEach ->
|
|
||||||
@CompileManager.getProjectCompileLimits = sinon.stub().callsArgWith(1, null, {compileGroup: "priority"})
|
|
||||||
@CompileController.proxyToClsi(@project_id, @url = "/test", @req, @res, @next)
|
|
||||||
|
|
||||||
it "should proxy to the priority url if the user has the feature", ()->
|
|
||||||
@request
|
|
||||||
.calledWith(
|
|
||||||
jar:@jar
|
|
||||||
method: @req.method
|
|
||||||
url: "#{@settings.apis.clsi_priority.url}#{@url}",
|
|
||||||
timeout: 60 * 1000
|
|
||||||
headers: {
|
|
||||||
'Range': '123-456'
|
|
||||||
'If-Range': 'abcdef'
|
|
||||||
'If-Modified-Since': 'Mon, 15 Dec 2014 15:23:56 GMT'
|
|
||||||
}
|
|
||||||
)
|
|
||||||
.should.equal true
|
|
||||||
|
|
||||||
describe "user with build parameter via query string", ->
|
describe "user with build parameter via query string", ->
|
||||||
beforeEach ->
|
beforeEach ->
|
||||||
|
|
Loading…
Reference in a new issue