summaryrefslogtreecommitdiff
path: root/backend/decky_loader/helpers.py
diff options
context:
space:
mode:
authorAAGaming <aagaming@riseup.net>2023-12-30 00:46:59 -0500
committerAAGaming <aagaming@riseup.net>2023-12-30 00:46:59 -0500
commit6522ebf0cad1723a278144b6c5d8557cd47e52d6 (patch)
tree8c048cfe75c73938d347f8e6cd7b8bb23269df2c /backend/decky_loader/helpers.py
parent6042ca56b85fffe6bac4cac5a2965ee87c4e1e32 (diff)
downloaddecky-loader-6522ebf0cad1723a278144b6c5d8557cd47e52d6.tar.gz
decky-loader-6522ebf0cad1723a278144b6c5d8557cd47e52d6.zip
Implement legacy & modern plugin method calls over WS
This version builds fine and runs all of the 14 plugins I have installed perfectly, so we're really close to having this done.
Diffstat (limited to 'backend/decky_loader/helpers.py')
-rw-r--r--backend/decky_loader/helpers.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/backend/decky_loader/helpers.py b/backend/decky_loader/helpers.py
index 0cd6518b..76c3db0a 100644
--- a/backend/decky_loader/helpers.py
+++ b/backend/decky_loader/helpers.py
@@ -34,7 +34,7 @@ def get_csrf_token():
@middleware
async def csrf_middleware(request: Request, handler: Handler):
- if str(request.method) == "OPTIONS" or request.headers.get('Authentication') == csrf_token or str(request.rel_url) == "/auth/token" or str(request.rel_url).startswith("/plugins/load_main/") or str(request.rel_url).startswith("/static/") or str(request.rel_url).startswith("/steam_resource/") or str(request.rel_url).startswith("/frontend/") or assets_regex.match(str(request.rel_url)) or frontend_regex.match(str(request.rel_url)):
+ if str(request.method) == "OPTIONS" or request.headers.get('Authentication') == csrf_token or str(request.rel_url) == "/auth/token" or str(request.rel_url).startswith("/plugins/load_main/") or str(request.rel_url).startswith("/static/") or str(request.rel_url).startswith("/steam_resource/") or str(request.rel_url).startswith("/frontend/") or str(request.rel_url.path) == "/ws" or assets_regex.match(str(request.rel_url)) or frontend_regex.match(str(request.rel_url)):
return await handler(request)
return Response(text='Forbidden', status=403)