Explorar o código

Merge pull request #257 from sharelatex/ta-remove-proxy-headers

Remove headers when proxying analytics request
Timothée Alby %!s(int64=9) %!d(string=hai) anos
pai
achega
62bc3f947f

+ 3 - 0
services/web/app/coffee/Features/Analytics/AnalyticsProxy.coffee

@@ -11,6 +11,9 @@ module.exports =
 				proxyReqPathResolver: (req) ->
 					requestPath = URL.parse(req.url).path
 					"#{basePath}#{requestPath}"
+				proxyReqOptDecorator: (proxyReqOpts, srcReq) ->
+					proxyReqOpts.headers = {} # unset all headers
+					proxyReqOpts
 			)
 		else
 			(req, res, next) ->