summaryrefslogtreecommitdiff
path: root/backend/src/helpers.py
diff options
context:
space:
mode:
authormarios8543 <marios8543@gmail.com>2023-10-17 16:07:43 +0300
committermarios8543 <marios8543@gmail.com>2023-10-31 23:17:49 +0200
commit39f64ca6667a0e8703a7a52d6e2bf0da57ee2cb6 (patch)
treec66694a983f4869cecb728c44928e01a1da97b07 /backend/src/helpers.py
parent2391af09eb8d97e485804d8f5c8798a0f1f776a8 (diff)
downloaddecky-loader-39f64ca6667a0e8703a7a52d6e2bf0da57ee2cb6.tar.gz
decky-loader-39f64ca6667a0e8703a7a52d6e2bf0da57ee2cb6.zip
Drop support for legacy plugins
Diffstat (limited to 'backend/src/helpers.py')
-rw-r--r--backend/src/helpers.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/backend/src/helpers.py b/backend/src/helpers.py
index f8796bd8..0acfd929 100644
--- a/backend/src/helpers.py
+++ b/backend/src/helpers.py
@@ -32,7 +32,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("/legacy/") 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 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)