what a mess :D
This commit is contained in:
parent
9dbeea07f8
commit
6dbc592a68
2 changed files with 6 additions and 4 deletions
|
@ -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
|
||||
|
|
|
@ -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':
|
||||
|
|
Loading…
Reference in a new issue