mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-02-13 02:41:50 +08:00
fix: 使用 csrfFetch 替换 fetch 以增强 API 请求的安全性
This commit is contained in:
@@ -415,7 +415,7 @@ async function cleanProjectStorage(projectId) {
|
||||
}
|
||||
|
||||
try {
|
||||
const res = await fetch('/api/storage/clean', {
|
||||
const res = await csrfFetch('/api/storage/clean', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({ projectId })
|
||||
@@ -451,7 +451,7 @@ async function cleanAllStorageConfirm() {
|
||||
}
|
||||
|
||||
try {
|
||||
const res = await fetch('/api/storage/clean', {
|
||||
const res = await csrfFetch('/api/storage/clean', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({ all: true })
|
||||
|
||||
Reference in New Issue
Block a user