Shift the config variable change to the allocated function
This commit is contained in:
parent
f6e362b1c8
commit
51c2655e2b
|
@ -78,6 +78,10 @@ def init_app_config(app, mongo_url):
|
||||||
# deciding to reset credentials and then still logging in with the old JWT.
|
# deciding to reset credentials and then still logging in with the old JWT.
|
||||||
app.config['JWT_SECRET_KEY'] = str(uuid.uuid4())
|
app.config['JWT_SECRET_KEY'] = str(uuid.uuid4())
|
||||||
|
|
||||||
|
# By default, Flask sorts keys of JSON objects alphabetically, which messes with the ATT&CK matrix in the
|
||||||
|
# configuration. See https://flask.palletsprojects.com/en/1.1.x/config/#JSON_SORT_KEYS.
|
||||||
|
app.config['JSON_SORT_KEYS'] = False
|
||||||
|
|
||||||
|
|
||||||
def init_app_services(app):
|
def init_app_services(app):
|
||||||
init_jwt(app)
|
init_jwt(app)
|
||||||
|
@ -143,7 +147,6 @@ def init_api_resources(api):
|
||||||
|
|
||||||
def init_app(mongo_url):
|
def init_app(mongo_url):
|
||||||
app = Flask(__name__)
|
app = Flask(__name__)
|
||||||
app.config['JSON_SORT_KEYS'] = False
|
|
||||||
|
|
||||||
api = flask_restful.Api(app)
|
api = flask_restful.Api(app)
|
||||||
api.representations = {'application/json': output_json}
|
api.representations = {'application/json': output_json}
|
||||||
|
|
Loading…
Reference in New Issue