Make debug secret key consistent

This commit is contained in:
Fabian Dill 2020-12-05 00:43:18 +01:00
parent e67852ba2c
commit c2be5a84f9
1 changed files with 3 additions and 2 deletions

View File

@ -4,6 +4,7 @@ So unless you're Berserker you need to include license information."""
import os import os
import uuid import uuid
import base64 import base64
import socket
from pony.flask import Pony from pony.flask import Pony
from flask import Flask, request, redirect, url_for, render_template, Response, session, abort, send_from_directory from flask import Flask, request, redirect, url_for, render_template, Response, session, abort, send_from_directory
@ -30,8 +31,8 @@ app.config["DEBUG"] = False
app.config["PORT"] = 80 app.config["PORT"] = 80
app.config['UPLOAD_FOLDER'] = UPLOAD_FOLDER app.config['UPLOAD_FOLDER'] = UPLOAD_FOLDER
app.config['MAX_CONTENT_LENGTH'] = 4 * 1024 * 1024 # 4 megabyte limit app.config['MAX_CONTENT_LENGTH'] = 4 * 1024 * 1024 # 4 megabyte limit
# if you want persistent sessions on your server, make sure you make this a constant in your config.yaml # if you want to deploy, make sure you have a non-guessable secret key
app.config["SECRET_KEY"] = os.urandom(32) app.config["SECRET_KEY"] = bytes(socket.gethostname(), encoding="utf-8")
# at what amount of worlds should scheduling be used, instead of rolling in the webthread # at what amount of worlds should scheduling be used, instead of rolling in the webthread
app.config["JOB_THRESHOLD"] = 2 app.config["JOB_THRESHOLD"] = 2
app.config['SESSION_PERMANENT'] = True app.config['SESSION_PERMANENT'] = True