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:
@@ -1114,7 +1114,7 @@ async function deleteInsight(insightId) {
|
||||
if (!confirm(t('memory.confirmDeleteInsight'))) return;
|
||||
|
||||
try {
|
||||
var response = await fetch('/api/memory/insights/' + insightId, { method: 'DELETE' });
|
||||
var response = await csrfFetch('/api/memory/insights/' + insightId, { method: 'DELETE' });
|
||||
if (!response.ok) throw new Error('Failed to delete insight');
|
||||
|
||||
selectedInsight = null;
|
||||
|
||||
Reference in New Issue
Block a user