Skip to content

Commit d93bcbb

Browse files
vdberghppigazzini
authored andcommitted
Disable CORS for the public get_run api
This only affects browsers. See https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/CORS CORS is already disabled for the actions api.
1 parent 449aff7 commit d93bcbb

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

server/fishtest/api.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -431,6 +431,8 @@ def get_run(self):
431431
self.handle_error(
432432
f"The run {run_id} does not exist", exception=HTTPNotFound
433433
)
434+
self.request.response.headers["access-control-allow-origin"] = "*"
435+
self.request.response.headers["access-control-allow-headers"] = "content-type"
434436
return strip_run(run)
435437

436438
@view_config(route_name="api_get_task")

0 commit comments

Comments
 (0)