Skip to content

Commit

Permalink
make sure xsrf token is set on static requests
Browse files Browse the repository at this point in the history
  • Loading branch information
minrk committed May 3, 2024
1 parent 61d6a1e commit 6887c64
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cylc/uiserver/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,9 @@ def initialize(self, *args, **kwargs):

def check_xsrf_cookie(self):
# don't need XSRF protections on static assets
# accessing xsrf_token ensures xsrf cookie is set if it needs to be,
# e.g. setting it on request for /index.html to be available for request to /userprofile
self.xsrf_token # noqa
return

@web.authenticated
Expand Down

0 comments on commit 6887c64

Please sign in to comment.