From 6dbc592a68193852816f39cdfcd4ba5b98bb04b5 Mon Sep 17 00:00:00 2001 From: deflax Date: Mon, 11 Apr 2016 14:54:34 +0300 Subject: [PATCH] what a mess :D --- humanjson.sh | 3 +++ proxmaster.py | 7 +++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/humanjson.sh b/humanjson.sh index 5e662f9..9f1f05f 100755 --- a/humanjson.sh +++ b/humanjson.sh @@ -3,6 +3,9 @@ #makes jsons human (and machine) readable #TODO: scan for all jsons and rewrite them. + +echo "CACHE:" +cat grid-cache.json | python3 -m json.tool echo " " echo "GRID:" cat grid-real.json | python3 -m json.tool diff --git a/proxmaster.py b/proxmaster.py index 00136b2..d8d4503 100644 --- a/proxmaster.py +++ b/proxmaster.py @@ -8,7 +8,6 @@ import logging import falcon import sys import json -import urllib.parse #import local packages import ioconfig @@ -33,10 +32,10 @@ def selector(fn, req, vmid=0): print(json) apipass = json['apikey'] if apipass != config.get('general', 'apipass'): - status = falcon.HTTP_404 - body = '404 Not Found' + status = falcon.HTTP_403 + body = falcon.HTTP_403 logger.error('grid> access denied. bad api key!') - fn = '404' + return status, body try: if fn == 'validate':