changes to run.sh
This commit is contained in:
2
backend
2
backend
Submodule backend updated: 3c6b6ba099...123eb65f8e
20
run.py
20
run.py
@@ -1,20 +0,0 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
# -*- coding: utf-8 -*-
|
||||
import ssl
|
||||
import logging
|
||||
from backend import app
|
||||
|
||||
logging.basicConfig(level=logging.DEBUG, format='%(asctime)s - %(name)s - %(levelname)s - %(message)s')
|
||||
|
||||
print(app.config.get("SERVER_NAME", None))
|
||||
server_name = app.config.get("SERVER_NAME", None)
|
||||
if server_name is not None and "ubkaps154.ubka.uni-karlsruhe.de" in server_name:
|
||||
try:
|
||||
context = ssl.SSLContext(ssl.PROTOCOL_TLSv1_2)
|
||||
context.load_cert_chain('cert.pem', 'key.pem')
|
||||
app.run(debug=True, ssl_context=context, threaded=True)
|
||||
except FileNotFoundError:
|
||||
app.run(debug=True, threaded=True)
|
||||
|
||||
app.run(debug=True)
|
||||
Reference in New Issue
Block a user