mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
revert to original CLSI proxy call
due to problems with cost of authentication when byte-serving
This commit is contained in:
parent
b5a32cea7b
commit
8a77d619a8
1 changed files with 1 additions and 6 deletions
|
@ -78,12 +78,7 @@ module.exports = CompileController =
|
|||
url = "#{compilerUrl}#{url}"
|
||||
logger.log url: url, "proxying to CLSI"
|
||||
oneMinute = 60 * 1000
|
||||
# pass through If-* and Range headers for byte serving pdfs
|
||||
# do not send any others, potential proxying loop if Host: is passed!
|
||||
newHeaders = {}
|
||||
for h, v of req.headers
|
||||
newHeaders[h] = req.headers[h] if h.match /^(If-|Range)/i
|
||||
proxy = request(url: url, method: req.method, timeout: oneMinute, headers: newHeaders)
|
||||
proxy = request(url: url, method: req.method, timeout: oneMinute)
|
||||
proxy.pipe(res)
|
||||
proxy.on "error", (error) ->
|
||||
logger.warn err: error, url: url, "CLSI proxy error"
|
||||
|
|
Loading…
Reference in a new issue