Skip to content

Conversation

@ohprettyhak
Copy link
Contributor

@ohprettyhak ohprettyhak commented Mar 12, 2024

🌍 이슈 번호

✅ 작업 내용

  • Netlify의 Redirects and rewrites 기능을 이용하여 /api/* path를 API 호출이 가능하게 변경하였습니다.

📝 참고 자료

  • /public/_redirects 파일을 syntax에 맞게 수정하면 룰이 적용됩니다.
  • 추후 netlify에서 이전하는 경우를 고려하여 next.config.js 파일에 적용한 rewrites 룰도 유지하였습니다.

@ohprettyhak ohprettyhak added the build Build changes label Mar 12, 2024
@ohprettyhak ohprettyhak self-assigned this Mar 12, 2024
@ohprettyhak ohprettyhak linked an issue Mar 12, 2024 that may be closed by this pull request
@netlify
Copy link

netlify bot commented Mar 12, 2024

Deploy Preview for hufscheer ready!

Name Link
🔨 Latest commit 4a406fa
🔍 Latest deploy log https://app.netlify.com/sites/hufscheer/deploys/65f16845df7bd20008078618
😎 Deploy Preview https://deploy-preview-80--hufscheer.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 98
Accessibility: 100
Best Practices: 100
SEO: 91
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify site configuration.

@netlify
Copy link

netlify bot commented Mar 12, 2024

Deploy Preview for hufscheer-manager ready!

Name Link
🔨 Latest commit 4a406fa
🔍 Latest deploy log https://app.netlify.com/sites/hufscheer-manager/deploys/65f1684567d4820008034171
😎 Deploy Preview https://deploy-preview-80--hufscheer-manager.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@seongminn
Copy link
Member

여전히 post 시에 403 에러가 발생하네요ㅠㅠ

프록시 서버에 대한 cors를 해제하지 않아서 그런 거 같기도 합니다. 한 번 확인해보면 좋을 것 같아요!

여담으로, _rewrites 파일 말고, 루트 경로에 netlify.toml을 생성하고 그 안에서 rewrite 설정을 해주니 되었다는 글도 본 적 있습니다! 참고 정도만 하면 좋지 않을까 해요ㅎㅎ

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

netlify.toml 파일은 public 디렉토리가 아니라 package.json, app, next.config.js 등이 있는 루트 경로에 생성해주어야 합니다!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

위치 변경해서 다시 올려보겠습니다.

@ohprettyhak ohprettyhak merged commit bd96a5b into main Mar 13, 2024
@ohprettyhak ohprettyhak deleted the build/netlify-redirect branch March 13, 2024 09:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build Build changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUILD] Netlify 프록시 환경 설정

3 participants