diff options
| author | marios8543 <marios8543@gmail.com> | 2023-10-17 16:07:43 +0300 |
|---|---|---|
| committer | marios8543 <marios8543@gmail.com> | 2023-10-17 17:08:23 +0300 |
| commit | 796b8b49f41657a44764c8557b5413bb3935e790 (patch) | |
| tree | 7447f3a2c56f639943d50b18195f6b9e4d0ddfab /backend/src/helpers.py | |
| parent | 1b9d674a81ab01c52c480cbb6a812938b0e87666 (diff) | |
| download | decky-loader-796b8b49f41657a44764c8557b5413bb3935e790.tar.gz decky-loader-796b8b49f41657a44764c8557b5413bb3935e790.zip | |
Drop support for legacy plugins
Diffstat (limited to 'backend/src/helpers.py')
| -rw-r--r-- | backend/src/helpers.py | 2 |
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) |
