Updating config setup to new structure

This commit is contained in:
itdominator 2021-08-09 13:29:27 -05:00
parent fefda7c423
commit 82dfee15f1
3 changed files with 39 additions and 38 deletions

View File

@ -19,15 +19,12 @@ from flask_login import current_user, login_user, logout_user, LoginManager
# Configs and 'init' # Configs and 'init'
app = Flask(__name__) 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.DevelopmentConfig")
# app.config.from_object("core.config.TestingConfig") # app.config.from_object("core.config.TestingConfig")
# app.jinja_env.globals['TITLE'] = app.config['TITLE'] app.jinja_env.globals['TITLE'] = app.config['TITLE']
# app.config['SECRET_KEY'] = app.config['SECRET_KEY'] # For csrf and some other stuff...
# Some fixers for Websockets # 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 Payload.max_decode_packets = 120 # Fix too many small packets causing error
# For Websockets # For Websockets
socketio = SocketIO(app, async_mode='eventlet') socketio = SocketIO(app, async_mode = 'eventlet',
# socketio = SocketIO(app, async_mode = 'eventlet', cors_allowed_origins = [
# cors_allowed_origins = [ "http://remoteconn.com",
# "http://localhost:5000", "https://remoteconn.com",
# "http://localhost:8088", "http://www.remoteconn.com",
# "http://www.remoteconn.com", "https://www.remoteconn.com"
# "https://www.remoteconn.com", ],
# "https://www.remoteconn.com/", allow_upgrades = True,
# "http://www.remoteconn.com/" engineio_logger = False,
# ], logger = True,
# # allow_upgrades = True, # manage_session = False,
# engineio_logger = True, # cookie = None
# # manage_session = False, )
# # cookie = None,
# logger = True,
# )
from core import routes from core import routes

View File

@ -16,26 +16,26 @@ ROOT_FILE_PTH = os.path.dirname(os.path.realpath(__file__))
class Config(object): class Config(object):
TITLE = APP_NAME TITLE = APP_NAME
# DEBUG = False DEBUG = False
# TESTING = False TESTING = False
# THREADED = False THREADED = False
SECRET_KEY = "2A#GQafbREoblgMSQYomZSxbaPE6dt#" SECRET_KEY = "2A#GQafbREoblgMSQYomZSxbaPE6dt#"
# SECRET_KEY = secrets.token_hex(32) # SECRET_KEY = secrets.token_hex(32)
# PERMANENT_SESSION_LIFETIME = timedelta(days = 7).total_seconds() PERMANENT_SESSION_LIFETIME = timedelta(days = 7).total_seconds()
# SQLALCHEMY_TRACK_MODIFICATIONS = False SQLALCHEMY_TRACK_MODIFICATIONS = False
#
# LOGIN_PATH = "OIDC" # Value can be OIDC or FLASK_LOGIN LOGIN_PATH = "OIDC" # Value can be OIDC or FLASK_LOGIN
# OIDC_TOKEN_TYPE_HINT = 'access_token' 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 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_CLIENT_SECRETS = ROOT_FILE_PTH + '/client_secrets.json'
# OIDC_ID_TOKEN_COOKIE_SECURE = True OIDC_ID_TOKEN_COOKIE_SECURE = True
# OIDC_REQUIRE_VERIFIED_EMAIL = False OIDC_REQUIRE_VERIFIED_EMAIL = False
# OIDC_USER_INFO_ENABLED = True OIDC_USER_INFO_ENABLED = True
# OIDC_VALID_ISSUERS = [ OIDC_VALID_ISSUERS = [
# 'http://www.ssoapps.com/auth/realms/apps', 'http://www.ssoapps.com/auth/realms/apps',
# 'https://www.ssoapps.com/auth/realms/apps' 'https://www.ssoapps.com/auth/realms/apps'
# ] ]
STATIC_FPTH = ROOT_FILE_PTH + "/static" STATIC_FPTH = ROOT_FILE_PTH + "/static"

View File

@ -10,6 +10,13 @@ function main() {
cd "${SCRIPTPATH}" cd "${SCRIPTPATH}"
echo "Working Dir: " $(pwd) echo "Working Dir: " $(pwd)
mkdir /tmp/apps 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" source "../venv/bin/activate"
LOG_LEVEL=debug LOG_LEVEL=debug