misp-modules/website/conf/config.py

32 lines
778 B
Python
Raw Normal View History

2024-02-07 14:39:19 +01:00
class Config:
SECRET_KEY = 'SECRET_KEY_ENV_VAR_NOT_SET'
FLASK_URL = '127.0.0.1'
FLASK_PORT = 7008
MISP_MODULE = '127.0.0.1:6666'
2024-03-11 15:27:25 +01:00
QUERIES_LIMIT = 200
2024-02-07 14:39:19 +01:00
class DevelopmentConfig(Config):
DEBUG = True
SQLALCHEMY_DATABASE_URI = "sqlite:///misp-module.sqlite"
2024-02-12 15:36:38 +01:00
SESSION_TYPE = "sqlalchemy"
SESSION_SQLALCHEMY_TABLE = "flask_sessions"
2024-02-07 14:39:19 +01:00
@classmethod
def init_app(cls, app):
print('THIS APP IS IN DEBUG MODE. \
YOU SHOULD NOT SEE THIS IN PRODUCTION.')
class TestingConfig(Config):
TESTING = True
SQLALCHEMY_DATABASE_URI = "sqlite:///misp-module-test.sqlite"
WTF_CSRF_ENABLED = False
config = {
'development': DevelopmentConfig,
'testing': TestingConfig,
'default': DevelopmentConfig
}