this can run on localhost with cookies w/ burnettk

This commit is contained in:
jasquat 2023-01-11 16:11:21 -05:00
parent 0974cda185
commit 8ab5ad7074
3 changed files with 7 additions and 9 deletions

View File

@ -17,12 +17,10 @@ RUN_BACKGROUND_SCHEDULER = (
environ.get("RUN_BACKGROUND_SCHEDULER", default="false") == "true"
)
SPIFFWORKFLOW_FRONTEND_URL = environ.get(
# "SPIFFWORKFLOW_FRONTEND_URL", default="http://localhost:7001"
"SPIFFWORKFLOW_FRONTEND_URL", default="http://spiff.localdev"
"SPIFFWORKFLOW_FRONTEND_URL", default="http://localhost:7001"
)
SPIFFWORKFLOW_BACKEND_URL = environ.get(
# "SPIFFWORKFLOW_BACKEND_URL", default="http://localhost:7000"
"SPIFFWORKFLOW_BACKEND_URL", default="http://api.spiff.localdev"
"SPIFFWORKFLOW_BACKEND_URL", default="http://localhost:7000"
)
# service task connector proxy
CONNECTOR_PROXY_URL = environ.get(
@ -32,8 +30,7 @@ CONNECTOR_PROXY_URL = environ.get(
# Open ID server
OPEN_ID_SERVER_URL = environ.get(
# "OPEN_ID_SERVER_URL", default="http://localhost:7002/realms/spiffworkflow"
# "OPEN_ID_SERVER_URL", default="http://keycloak.spiff.localdev/realms/spiffworkflow"
"OPEN_ID_SERVER_URL", default="http://api.spiff.localdev/openid"
"OPEN_ID_SERVER_URL", default="http://localhost:7000/openid"
)
# Replace above line with this to use the built-in Open ID Server.

View File

@ -1,5 +1,6 @@
"""APIs for dealing with process groups, process models, and process instances."""
import json
from flask import current_app
import flask.wrappers
from flask.wrappers import Response
@ -11,6 +12,6 @@ def status() -> flask.wrappers.Response:
"""Status."""
ProcessInstanceModel.query.filter().first()
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')
# print(f"current_app.config.get('SPIFFWORKFLOW_FRONTEND_URL').replace('http://', ''): {current_app.config.get('SPIFFWORKFLOW_FRONTEND_URL').replace('http://', '')}")
response.set_cookie('TEST_COOKIE1', 'HEY', domain=None)
return response

View File

@ -92,7 +92,7 @@ def process_group_list(
# response = make_response(jsonify(response_json), 200)
response = Response(json.dumps(response_json), status=200, mimetype="application/json")
current_app.logger.info("SETTING COOKIE")
response.set_cookie('TEST_COOKIE', 'HEY1', domain='spiff.localdev')
response.set_cookie('TEST_COOKIE', 'HEY1')
return response