summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--remote-https-runner/runner.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/remote-https-runner/runner.py b/remote-https-runner/runner.py
index ef3f67f..1725404 100644
--- a/remote-https-runner/runner.py
+++ b/remote-https-runner/runner.py
@@ -28,6 +28,10 @@ config_keys = config.keys()
def key(key):
logging.info("User requested route \"{}\"".format(key))
+ if not key in config_keys:
+ logging.warning("Route \"{}\" does not exist!".format(key))
+ return Response("", status=404)
+
options = config[key]
protocol = request.url.split("://")[0]
logging.info("User uses protocol {}".format(protocol))
@@ -41,10 +45,6 @@ def key(key):
logging.warning("User request rejected due to incorrect Authorization header!")
return Response("", status=401)
- if not key in config_keys:
- logging.warning("Route \"{}\" does not exist!".format(key))
- return Response("", status=404)
-
if request.content_type != "application/json":
logging.warning("User request rejected due to incorrect content type (must be application/json)!")
return Response("", status=400)