this somewhat works and sets cookies w/ burnettk
This commit is contained in:
parent
4b5d2d6112
commit
aa626d7432
|
@ -115,7 +115,7 @@ def create_app() -> flask.app.Flask:
|
||||||
r"^https?:\/\/%s(.*)" % o.replace(".", r"\.")
|
r"^https?:\/\/%s(.*)" % o.replace(".", r"\.")
|
||||||
for o in app.config["CORS_ALLOW_ORIGINS"]
|
for o in app.config["CORS_ALLOW_ORIGINS"]
|
||||||
]
|
]
|
||||||
CORS(app, origins=origins_re, max_age=3600)
|
CORS(app, origins=origins_re, max_age=3600, supports_credentials=True)
|
||||||
|
|
||||||
connexion_app.add_api("api.yml", base_path=V1_API_PATH_PREFIX)
|
connexion_app.add_api("api.yml", base_path=V1_API_PATH_PREFIX)
|
||||||
|
|
||||||
|
|
|
@ -10,4 +10,7 @@ from spiffworkflow_backend.models.process_instance import ProcessInstanceModel
|
||||||
def status() -> flask.wrappers.Response:
|
def status() -> flask.wrappers.Response:
|
||||||
"""Status."""
|
"""Status."""
|
||||||
ProcessInstanceModel.query.filter().first()
|
ProcessInstanceModel.query.filter().first()
|
||||||
return Response(json.dumps({"ok": True}), status=200, mimetype="application/json")
|
response = Response(json.dumps({"ok": True}), status=200, mimetype="application/json")
|
||||||
|
response.set_cookie('TEST_COOKIE', 'HEY')
|
||||||
|
response.set_cookie('TEST_COOKIE', 'HEY', domain='spiff.localdev')
|
||||||
|
return response
|
||||||
|
|
|
@ -89,9 +89,10 @@ def process_group_list(
|
||||||
"pages": pages,
|
"pages": pages,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
response = make_response(jsonify(response_json), 200)
|
# response = make_response(jsonify(response_json), 200)
|
||||||
|
response = Response(json.dumps(response_json), status=200, mimetype="application/json")
|
||||||
current_app.logger.info("SETTING COOKIE")
|
current_app.logger.info("SETTING COOKIE")
|
||||||
# response.set_cookie('TEST_COOKIE', 'HEY', domain=".spiff.dev", secure=False, httponly=True)
|
response.set_cookie('TEST_COOKIE', 'HEY1', domain='spiff.localdev')
|
||||||
return response
|
return response
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue