add project url onto query string for compile hashing

This commit is contained in:
Henry Oswald 2016-04-13 15:38:04 +01:00
parent 010bb61baf
commit ffa04c7b55
2 changed files with 3 additions and 0 deletions

View file

@ -37,6 +37,8 @@ module.exports = ClsiManager =
url: "#{compilerUrl}/project/#{project_id}/compile" url: "#{compilerUrl}/project/#{project_id}/compile"
json: req json: req
jar: false jar: false
query:
project_id:project_id
}, (error, response, body) -> }, (error, response, body) ->
return callback(error) if error? return callback(error) if error?
if 200 <= response.statusCode < 300 if 200 <= response.statusCode < 300

View file

@ -127,6 +127,7 @@ module.exports = CompileController =
for h, v of req.headers for h, v of req.headers
newHeaders[h] = req.headers[h] if h.match /^(If-|Range)/i newHeaders[h] = req.headers[h] if h.match /^(If-|Range)/i
options.headers = newHeaders options.headers = newHeaders
req.query.project_id = project_id
proxy = request(options) proxy = request(options)
proxy.pipe(res) proxy.pipe(res)
proxy.on "error", (error) -> proxy.on "error", (error) ->