this can run on localhost with cookies w/ burnettk

This commit is contained in:
jasquat 2023-01-11 16:11:21 -05:00
parent 1630c9c7b4
commit 3541225700
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" environ.get("RUN_BACKGROUND_SCHEDULER", default="false") == "true"
) )
SPIFFWORKFLOW_FRONTEND_URL = environ.get( SPIFFWORKFLOW_FRONTEND_URL = environ.get(
# "SPIFFWORKFLOW_FRONTEND_URL", default="http://localhost:7001" "SPIFFWORKFLOW_FRONTEND_URL", default="http://localhost:7001"
"SPIFFWORKFLOW_FRONTEND_URL", default="http://spiff.localdev"
) )
SPIFFWORKFLOW_BACKEND_URL = environ.get( SPIFFWORKFLOW_BACKEND_URL = environ.get(
# "SPIFFWORKFLOW_BACKEND_URL", default="http://localhost:7000" "SPIFFWORKFLOW_BACKEND_URL", default="http://localhost:7000"
"SPIFFWORKFLOW_BACKEND_URL", default="http://api.spiff.localdev"
) )
# service task connector proxy # service task connector proxy
CONNECTOR_PROXY_URL = environ.get( CONNECTOR_PROXY_URL = environ.get(
@ -32,8 +30,7 @@ CONNECTOR_PROXY_URL = environ.get(
# Open ID server # Open ID server
OPEN_ID_SERVER_URL = environ.get( OPEN_ID_SERVER_URL = environ.get(
# "OPEN_ID_SERVER_URL", default="http://localhost:7002/realms/spiffworkflow" # "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://localhost:7000/openid"
"OPEN_ID_SERVER_URL", default="http://api.spiff.localdev/openid"
) )
# Replace above line with this to use the built-in Open ID Server. # 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.""" """APIs for dealing with process groups, process models, and process instances."""
import json import json
from flask import current_app
import flask.wrappers import flask.wrappers
from flask.wrappers import Response from flask.wrappers import Response
@ -11,6 +12,6 @@ def status() -> flask.wrappers.Response:
"""Status.""" """Status."""
ProcessInstanceModel.query.filter().first() ProcessInstanceModel.query.filter().first()
response = 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') # print(f"current_app.config.get('SPIFFWORKFLOW_FRONTEND_URL').replace('http://', ''): {current_app.config.get('SPIFFWORKFLOW_FRONTEND_URL').replace('http://', '')}")
response.set_cookie('TEST_COOKIE', 'HEY', domain='spiff.localdev') response.set_cookie('TEST_COOKIE1', 'HEY', domain=None)
return response return response

View File

@ -92,7 +92,7 @@ def process_group_list(
# 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") 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', 'HEY1', domain='spiff.localdev') response.set_cookie('TEST_COOKIE', 'HEY1')
return response return response