Updating config setup to new structure
This commit is contained in:
parent
fefda7c423
commit
82dfee15f1
|
@ -19,15 +19,12 @@ from flask_login import current_user, login_user, logout_user, LoginManager
|
|||
|
||||
# Configs and 'init'
|
||||
app = Flask(__name__)
|
||||
app.config['TITLE'] = 'RemoteMouse'
|
||||
app.config['SECRET_KEY'] = "2A#GQafbREoblgMSQYomZSxbaPE6dt#" # For csrf and some other stuff...
|
||||
|
||||
# app.config.from_object("core.config.ProductionConfig")
|
||||
app.config.from_object("core.config.ProductionConfig")
|
||||
# app.config.from_object("core.config.DevelopmentConfig")
|
||||
# app.config.from_object("core.config.TestingConfig")
|
||||
|
||||
# app.jinja_env.globals['TITLE'] = app.config['TITLE']
|
||||
# app.config['SECRET_KEY'] = app.config['SECRET_KEY'] # For csrf and some other stuff...
|
||||
app.jinja_env.globals['TITLE'] = app.config['TITLE']
|
||||
|
||||
|
||||
# Some fixers for Websockets
|
||||
|
@ -36,22 +33,19 @@ app.config['SECRET_KEY'] = "2A#GQafbREoblgMSQYomZSxbaPE6dt#" # For csrf and so
|
|||
Payload.max_decode_packets = 120 # Fix too many small packets causing error
|
||||
|
||||
# For Websockets
|
||||
socketio = SocketIO(app, async_mode='eventlet')
|
||||
# socketio = SocketIO(app, async_mode = 'eventlet',
|
||||
# cors_allowed_origins = [
|
||||
# "http://localhost:5000",
|
||||
# "http://localhost:8088",
|
||||
# "http://www.remoteconn.com",
|
||||
# "https://www.remoteconn.com",
|
||||
# "https://www.remoteconn.com/",
|
||||
# "http://www.remoteconn.com/"
|
||||
# ],
|
||||
# # allow_upgrades = True,
|
||||
# engineio_logger = True,
|
||||
# # manage_session = False,
|
||||
# # cookie = None,
|
||||
# logger = True,
|
||||
# )
|
||||
socketio = SocketIO(app, async_mode = 'eventlet',
|
||||
cors_allowed_origins = [
|
||||
"http://remoteconn.com",
|
||||
"https://remoteconn.com",
|
||||
"http://www.remoteconn.com",
|
||||
"https://www.remoteconn.com"
|
||||
],
|
||||
allow_upgrades = True,
|
||||
engineio_logger = False,
|
||||
logger = True,
|
||||
# manage_session = False,
|
||||
# cookie = None
|
||||
)
|
||||
|
||||
|
||||
from core import routes
|
||||
|
|
|
@ -16,26 +16,26 @@ ROOT_FILE_PTH = os.path.dirname(os.path.realpath(__file__))
|
|||
|
||||
class Config(object):
|
||||
TITLE = APP_NAME
|
||||
# DEBUG = False
|
||||
# TESTING = False
|
||||
# THREADED = False
|
||||
DEBUG = False
|
||||
TESTING = False
|
||||
THREADED = False
|
||||
SECRET_KEY = "2A#GQafbREoblgMSQYomZSxbaPE6dt#"
|
||||
# SECRET_KEY = secrets.token_hex(32)
|
||||
|
||||
# PERMANENT_SESSION_LIFETIME = timedelta(days = 7).total_seconds()
|
||||
# SQLALCHEMY_TRACK_MODIFICATIONS = False
|
||||
#
|
||||
# LOGIN_PATH = "OIDC" # Value can be OIDC or FLASK_LOGIN
|
||||
# OIDC_TOKEN_TYPE_HINT = 'access_token'
|
||||
# APP_REDIRECT_URI = "https%3A%2F%2Fwww.remoteconn.com%2F" # This path is submitted as the redirect URI in certain code flows
|
||||
# OIDC_CLIENT_SECRETS = ROOT_FILE_PTH + '/client_secrets.json'
|
||||
# OIDC_ID_TOKEN_COOKIE_SECURE = True
|
||||
# OIDC_REQUIRE_VERIFIED_EMAIL = False
|
||||
# OIDC_USER_INFO_ENABLED = True
|
||||
# OIDC_VALID_ISSUERS = [
|
||||
# 'http://www.ssoapps.com/auth/realms/apps',
|
||||
# 'https://www.ssoapps.com/auth/realms/apps'
|
||||
# ]
|
||||
PERMANENT_SESSION_LIFETIME = timedelta(days = 7).total_seconds()
|
||||
SQLALCHEMY_TRACK_MODIFICATIONS = False
|
||||
|
||||
LOGIN_PATH = "OIDC" # Value can be OIDC or FLASK_LOGIN
|
||||
OIDC_TOKEN_TYPE_HINT = 'access_token'
|
||||
APP_REDIRECT_URI = "https%3A%2F%2Fwww.remoteconn.com%2F" # This path is submitted as the redirect URI in certain code flows
|
||||
OIDC_CLIENT_SECRETS = ROOT_FILE_PTH + '/client_secrets.json'
|
||||
OIDC_ID_TOKEN_COOKIE_SECURE = True
|
||||
OIDC_REQUIRE_VERIFIED_EMAIL = False
|
||||
OIDC_USER_INFO_ENABLED = True
|
||||
OIDC_VALID_ISSUERS = [
|
||||
'http://www.ssoapps.com/auth/realms/apps',
|
||||
'https://www.ssoapps.com/auth/realms/apps'
|
||||
]
|
||||
|
||||
STATIC_FPTH = ROOT_FILE_PTH + "/static"
|
||||
|
||||
|
|
|
@ -10,6 +10,13 @@ function main() {
|
|||
cd "${SCRIPTPATH}"
|
||||
echo "Working Dir: " $(pwd)
|
||||
mkdir /tmp/apps
|
||||
|
||||
echo "I can't get websocket socket to work with unix socket...."
|
||||
echo "So, this script doesn't really work and will be exited."
|
||||
return ;
|
||||
|
||||
|
||||
|
||||
source "../venv/bin/activate"
|
||||
|
||||
LOG_LEVEL=debug
|
||||
|
|
Loading…
Reference in New Issue