this somewhat works and sets cookies w/ burnettk
This commit is contained in:
parent
6b5087c128
commit
1630c9c7b4
|
@ -115,7 +115,7 @@ def create_app() -> flask.app.Flask:
|
|||
r"^https?:\/\/%s(.*)" % o.replace(".", r"\.")
|
||||
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)
|
||||
|
||||
|
|
|
@ -10,4 +10,7 @@ from spiffworkflow_backend.models.process_instance import ProcessInstanceModel
|
|||
def status() -> flask.wrappers.Response:
|
||||
"""Status."""
|
||||
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,
|
||||
},
|
||||
}
|
||||
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")
|
||||
# response.set_cookie('TEST_COOKIE', 'HEY', domain=".spiff.dev", secure=False, httponly=True)
|
||||
response.set_cookie('TEST_COOKIE', 'HEY1', domain='spiff.localdev')
|
||||
return response
|
||||
|
||||
|
||||
|
|
|
@ -42,6 +42,12 @@ export default function ProcessGroupList() {
|
|||
path: `/process-models?per_page=1000&recursive=true&include_parent_groups=true`,
|
||||
successCallback: processResultForProcessModels,
|
||||
});
|
||||
HttpService.makeCallToBackend({
|
||||
path: `/status`,
|
||||
successCallback: (result: any) => {
|
||||
console.log(result);
|
||||
},
|
||||
});
|
||||
}, [searchParams]);
|
||||
|
||||
const processModelSearchArea = () => {
|
||||
|
@ -63,8 +69,10 @@ export default function ProcessGroupList() {
|
|||
};
|
||||
|
||||
if (processModelAvailableItems) {
|
||||
console.log('document.cookie', document.cookie);
|
||||
return (
|
||||
<>
|
||||
{document.cookie}
|
||||
<ProcessBreadcrumb hotCrumbs={[['Process Groups']]} />
|
||||
<Can I="POST" a={targetUris.processGroupListPath} ability={ability}>
|
||||
<Button kind="secondary" href="/admin/process-groups/new">
|
||||
|
|
|
@ -64,6 +64,7 @@ backendCallProps) => {
|
|||
Object.assign(httpArgs, {
|
||||
headers: new Headers(headers as any),
|
||||
method: httpMethod,
|
||||
credentials: 'include',
|
||||
});
|
||||
|
||||
const updatedPath = path.replace(/^\/v1\.0/, '');
|
||||
|
|
Loading…
Reference in New Issue