aboutsummaryrefslogtreecommitdiff
path: root/lib/compile-handler.js
diff options
context:
space:
mode:
authorMatt Godbolt <matt@godbolt.org>2017-01-18 08:47:40 -0600
committerMatt Godbolt <matt@godbolt.org>2017-01-18 08:47:40 -0600
commit2b1be4ed717b1c67f573201f13fee7cb8c16c3dc (patch)
tree659c84c802d5c214779a1b76e8d1cb7d00b6e238 /lib/compile-handler.js
parenteb679d56c7afeb2d34c090aedd84ca17eff54493 (diff)
downloadcompiler-explorer-2b1be4ed717b1c67f573201f13fee7cb8c16c3dc.tar.gz
compiler-explorer-2b1be4ed717b1c67f573201f13fee7cb8c16c3dc.zip
Fix proxying of requests. Fixes #239
Diffstat (limited to 'lib/compile-handler.js')
-rw-r--r--lib/compile-handler.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/compile-handler.js b/lib/compile-handler.js
index 70f8e712d..774eb5b55 100644
--- a/lib/compile-handler.js
+++ b/lib/compile-handler.js
@@ -121,6 +121,7 @@ function CompileHandler(gccProps, compilerProps) {
}
var remote = compiler.getRemote();
if (remote) {
+ req.url = req.originalUrl; // Undo any routing that was done to get here (i.e. /api/* path has been removed)
proxy.web(req, res, {target: remote}, function (e) {
logger.error("Proxy error: ", e);
next(e);