mirror of https://github.com/MISP/misp-modules
34 lines
857 B
Python
34 lines
857 B
Python
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'
|
|
|
|
class DevelopmentConfig(Config):
|
|
DEBUG = True
|
|
SQLALCHEMY_DATABASE_URI = "sqlite:///misp-module.sqlite"
|
|
|
|
@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
|
|
|
|
@classmethod
|
|
def init_app(cls, app):
|
|
print('THIS APP IS IN TESTING MODE. \
|
|
YOU SHOULD NOT SEE THIS IN PRODUCTION.')
|
|
|
|
|
|
config = {
|
|
'development': DevelopmentConfig,
|
|
'testing': TestingConfig,
|
|
# 'production': ProductionConfig,
|
|
'default': DevelopmentConfig
|
|
}
|