Merge pull request #824 from pUrGe12/patch-csrf

This commit is contained in:
Jan Tomášek 2025-11-26 21:50:19 +01:00 committed by GitHub
commit 4121c04b54
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 11 additions and 5 deletions

View file

@ -29,7 +29,7 @@ class GetCsrfToken(ApiHandler):
if not origin_check["ok"]:
return {
"ok": False,
"error": f"Origin {self.get_origin_from_request(request)} not allowed when login is disabled. Set login and password or add your URL to ALLOWED_ORIGINS env variable. Currently allowed origins: {",".join(origin_check['allowed_origins'])}",
"error": f"Origin {self.get_origin_from_request(request)} not allowed when login is disabled. Set login and password or add your URL to ALLOWED_ORIGINS env variable. Currently allowed origins: {','.join(origin_check['allowed_origins'])}",
}
# generate a csrf token if it doesn't exist