diff options
| author | ynhhoJ <22500212+ynhhoJ@users.noreply.github.com> | 2025-05-30 03:30:48 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-05-29 17:30:48 -0700 |
| commit | e4f7546f99e315f4f76d8bcaff2610f34098e43a (patch) | |
| tree | a9d9b3ad8a69a4407a601b846c402306c1675e6f /backend/decky_loader/helpers.py | |
| parent | 4e5468a3538d80fe65ae3958abbcb452b5348945 (diff) | |
| download | decky-loader-e4f7546f99e315f4f76d8bcaff2610f34098e43a.tar.gz decky-loader-e4f7546f99e315f4f76d8bcaff2610f34098e43a.zip | |
Add support of files from `data/<plugin>/` to be fetched from Front-End (#761)
* Add support of files from `data/<plugin>/assets/` to be fetched from Front-End
* Add `data` regex folder into `csrf_middleware`
Diffstat (limited to 'backend/decky_loader/helpers.py')
| -rw-r--r-- | backend/decky_loader/helpers.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/backend/decky_loader/helpers.py b/backend/decky_loader/helpers.py index c5c3cd9a..857503ab 100644 --- a/backend/decky_loader/helpers.py +++ b/backend/decky_loader/helpers.py @@ -23,6 +23,7 @@ csrf_token = str(uuid.uuid4()) ssl_ctx = ssl.create_default_context(cafile=certifi.where()) assets_regex = re.compile("^/plugins/.*/assets/.*") +data_regex = re.compile("^/plugins/.*/data/.*") dist_regex = re.compile("^/plugins/.*/dist/.*") frontend_regex = re.compile("^/frontend/.*") logger = getLogger("Main") @@ -45,6 +46,7 @@ async def csrf_middleware(request: Request, handler: Handler): str(request.rel_url.path) == "/fetch" or \ str(request.rel_url.path) == "/ws" or \ assets_regex.match(str(request.rel_url)) or \ + data_regex.match(str(request.rel_url)) or \ dist_regex.match(str(request.rel_url)) or \ frontend_regex.match(str(request.rel_url)): |
