Commit c9fe7608 authored by Julian Bloos's avatar Julian Bloos
Browse files

wsgi.py

parent c4002f64
graphs @ 6984f1a7
Subproject commit 88e668dd815e2563d171f77374e2f7c5ef08467b
Subproject commit 6984f1a7b598fc14d55e977320d7afeb9e0fb78a
written_language_recognition @ fead69b0
Subproject commit 899cac307e9185d3f94491755df61ddd60c87782
Subproject commit fead69b0835d3ece91f8b2744a80da4e31414d52
import sys
sys.stdin = sys.stderr
sys.path.insert(0,".")
from server import Server
import os
import json
dirname = os.path.dirname(__file__)
extensions = None
with open(dirname+'/cfg.json', 'r') as f:
global auth
global config
jn = json.load(f)
config = jn
if "EXTENSIONS" in jn.keys():
extensions = jn["EXTENSIONS"]
auth = None
if "AUTH" in jn.keys() and jn["AUTH"] == "KERBEROS":
auth = jn["AUTH"]
krb5_ktname = jn["KRB5_KTNAME"]
krb5_config = jn["KRB5_CONFIG"]
krb5_trace = jn["KRB5_TRACE"]
os.environ['KRB5_CONFIG'] = krb5_config
os.environ['KRB5_KTNAME'] = krb5_ktname
os.environ['KRB5_TRACE'] = krb5_trace
from flask_gssapi import GSSAPI
if auth == None:
pass
server = Server(config)
server.load_modules(extensions)
application = server.app
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment