diff options
| author | AAGaming <aa@mail.catvibers.me> | 2022-08-05 21:16:29 -0400 |
|---|---|---|
| committer | AAGaming <aa@mail.catvibers.me> | 2022-08-05 21:16:29 -0400 |
| commit | f21d34506d0fd09d5849fcee552447cdfbf4802f (patch) | |
| tree | fa7475021d12d54f5edb74489b9ecf81a16bd639 /frontend/src/updater.ts | |
| parent | ab6ec981604a32611d972ede634abe7ccd19b0d2 (diff) | |
| download | decky-loader-f21d34506d0fd09d5849fcee552447cdfbf4802f.tar.gz decky-loader-f21d34506d0fd09d5849fcee552447cdfbf4802f.zip | |
Implement CSRF protection
Diffstat (limited to 'frontend/src/updater.ts')
| -rw-r--r-- | frontend/src/updater.ts | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/frontend/src/updater.ts b/frontend/src/updater.ts index 692a7a70..f499d030 100644 --- a/frontend/src/updater.ts +++ b/frontend/src/updater.ts @@ -14,8 +14,10 @@ export interface DeckyUpdater { export async function callUpdaterMethod(methodName: string, args = {}) { const response = await fetch(`http://127.0.0.1:1337/updater/${methodName}`, { method: 'POST', + credentials: 'include', headers: { 'Content-Type': 'application/json', + Authentication: window.deckyAuthToken, }, body: JSON.stringify(args), }); |
