Skip to content

Commit

Permalink
fix: add csrf token on header
Browse files Browse the repository at this point in the history
Signed-off-by: Innei <tukon479@gmail.com>
  • Loading branch information
Innei committed Oct 17, 2024
1 parent 7c2554d commit 2718c93
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion apps/renderer/src/lib/api-fetch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,11 @@ export const apiClient = hc<AppType>(env.VITE_API_URL, {
}
throw err
}),
headers() {
async headers() {
return {
"X-App-Version": PKG.version,
"X-App-Dev": process.env.NODE_ENV === "development" ? "1" : "0",
"X-Csrf-Token": await getCsrfToken(),
}
},
})

0 comments on commit 2718c93

Please sign in to comment.