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':