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
|
#makes jsons human (and machine) readable
|
||||||
|
|
||||||
#TODO: scan for all jsons and rewrite them.
|
#TODO: scan for all jsons and rewrite them.
|
||||||
|
|
||||||
|
echo "CACHE:"
|
||||||
|
cat grid-cache.json | python3 -m json.tool
|
||||||
echo " "
|
echo " "
|
||||||
echo "GRID:"
|
echo "GRID:"
|
||||||
cat grid-real.json | python3 -m json.tool
|
cat grid-real.json | python3 -m json.tool
|
||||||
|
|
|
@ -8,7 +8,6 @@ import logging
|
||||||
import falcon
|
import falcon
|
||||||
import sys
|
import sys
|
||||||
import json
|
import json
|
||||||
import urllib.parse
|
|
||||||
|
|
||||||
#import local packages
|
#import local packages
|
||||||
import ioconfig
|
import ioconfig
|
||||||
|
@ -33,10 +32,10 @@ def selector(fn, req, vmid=0):
|
||||||
print(json)
|
print(json)
|
||||||
apipass = json['apikey']
|
apipass = json['apikey']
|
||||||
if apipass != config.get('general', 'apipass'):
|
if apipass != config.get('general', 'apipass'):
|
||||||
status = falcon.HTTP_404
|
status = falcon.HTTP_403
|
||||||
body = '404 Not Found'
|
body = falcon.HTTP_403
|
||||||
logger.error('grid> access denied. bad api key!')
|
logger.error('grid> access denied. bad api key!')
|
||||||
fn = '404'
|
return status, body
|
||||||
|
|
||||||
try:
|
try:
|
||||||
if fn == 'validate':
|
if fn == 'validate':
|
||||||
|
|
Loading…
Reference in a new issue