This commit is contained in:
2025-09-15 18:21:57 +09:00
parent 1ab12cb6d9
commit 39c9624774
5 changed files with 101 additions and 54 deletions
@@ -114,9 +114,17 @@
puzzleContainer.innerHTML = '';
try {
// 1. 레이아웃의 meta 태그에서 CSRF 토큰 값을 읽어옵니다.
const csrfToken = document.querySelector('meta[name="_csrf"]')?.getAttribute('content') || '';
const csrfHeader = document.querySelector('meta[name="_csrf_header"]')?.getAttribute('content') || 'X-CSRF-TOKEN';
// (★ 수정) API 경로 변경 -> 통합 컨트롤러의 /puzzle/upload.bjx 호출
const response = await fetch('/puzzle/upload.bjx', {
method: 'POST',
headers: {
[csrfHeader]: csrfToken
},
body: formData,
});