Iframe question - #2 by tshenry 이 주제를 이어가려 했지만, 원래 주제에서 다소 벗어난 것 같습니다.
이 게시물 Iframe question - #2 by tshenry 은 내 블로그 게시물 설명과 함께 URL을 성공적으로 로드합니다. 그러나 아래에 있는 박스, 즉 iframe은 Discourse에서 게시물을 볼 때 네트워크 탭(F12)을 확인해 본 결과, 로드조차 시도하지 않습니다. miniglot.com(Next.js가 Vercel에 호스팅되고 DNS는 Cloudflare 사용)으로 향한 요청은 하나도 없으며, forum.miniglot.com(Discourse 서버, 별도로 호스팅됨)으로 향한 요청만 있습니다.
게시물 마크업:
https://miniglot.com/blog/welcome-to-the-miniglot-community
<iframe url="https://miniglot.com/blog/welcome-to-the-miniglot-community"></iframe>
Discourse 설정 CORS origin:
- https miniglot.com
- https www.miniglot.com
Discourse 설정 “허용된 iframe”:
- miniglot.com
- https www.miniglot.com
- https miniglot.com
- https miniglot.com/blog/welcome-to-the-miniglot-community
- https www.miniglot.com/blog/welcome-to-the-miniglot-community
miniglot.com의 next.config.js:
… 하지만 서버가 호출되는 것을 전혀 보지 못하므로 이 부분은 범위에 포함되지 않는다고 생각합니다:
...
async headers() {
return [
{
source: '/(.*)',
headers: [
{
key: 'X-Frame-Options',
value: 'ALLOWALL',
},
{
key: 'Content-Security-Policy',
value: "frame-ancestors 'self' https://forum.miniglot.com;",
},
],
},
]
},
...
혹시 조언이 있을까요? 지금은 iframe을 포기할지도 모르겠습니다. 제 Discourse에서 “블로그 댓글” 카테고리가 무엇에 관한 것인지, 그리고 블로그 페이지와 어떻게 연결되는지 초보자들이 이해하는 데 도움이 될 것 같아서 아쉬울 뿐입니다.
