mirror of
https://github.com/TitanEmbeds/Titan.git
synced 2025-04-18 15:01:56 +02:00
Set development process to threaded
This commit is contained in:
parent
52af78ade3
commit
25e35b650d
8
run.py
8
run.py
@ -4,9 +4,9 @@ from titanembeds.app import app
|
|||||||
def init_debug():
|
def init_debug():
|
||||||
import os
|
import os
|
||||||
from flask import jsonify, request
|
from flask import jsonify, request
|
||||||
|
|
||||||
os.environ['OAUTHLIB_INSECURE_TRANSPORT'] = '1' # Testing oauthlib
|
os.environ['OAUTHLIB_INSECURE_TRANSPORT'] = '1' # Testing oauthlib
|
||||||
|
|
||||||
# Session viewer https://gist.github.com/babldev/502364a3f7c9bafaa6db
|
# Session viewer https://gist.github.com/babldev/502364a3f7c9bafaa6db
|
||||||
def decode_flask_cookie(secret_key, cookie_str):
|
def decode_flask_cookie(secret_key, cookie_str):
|
||||||
import hashlib
|
import hashlib
|
||||||
@ -20,7 +20,7 @@ def init_debug():
|
|||||||
}
|
}
|
||||||
s = URLSafeTimedSerializer(secret_key, salt=salt, serializer=serializer, signer_kwargs=signer_kwargs)
|
s = URLSafeTimedSerializer(secret_key, salt=salt, serializer=serializer, signer_kwargs=signer_kwargs)
|
||||||
return s.loads(cookie_str)
|
return s.loads(cookie_str)
|
||||||
|
|
||||||
@app.route("/session")
|
@app.route("/session")
|
||||||
def session():
|
def session():
|
||||||
cookie = request.cookies.get('session')
|
cookie = request.cookies.get('session')
|
||||||
@ -32,4 +32,4 @@ def init_debug():
|
|||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
init_debug()
|
init_debug()
|
||||||
app.run(host="0.0.0.0",port=3000,debug=True)
|
app.run(host="0.0.0.0",port=3000,debug=True,processes=3)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user