Add nginx proxy for API endpoints - Contact form fully working
This commit is contained in:
@@ -75,10 +75,8 @@ if (contactSubmitBtn) {
|
||||
contactStatus.classList.add('hidden');
|
||||
|
||||
try {
|
||||
// Python FastAPI 엔드포인트로 요청
|
||||
// 현재 페이지의 호스트를 사용
|
||||
const apiUrl = `${window.location.protocol}//${window.location.hostname}:8001/api/contact`;
|
||||
const response = await fetch(apiUrl, {
|
||||
// FastAPI 엔드포인트로 요청 (nginx 프록시를 통함)
|
||||
const response = await fetch('/api/contact', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
|
||||
Reference in New Issue
Block a user