localhost:2368을 Customize/Embedding 허용 호스트에 추가했습니다(클래스 이름, 경로 허용 목록 또는 포스트 카테고리 설정 없이).
코드 스니펫을 추가한 후(물론 플레이스홀더를 올바르게 교체한 후) "Loading discussion…"라고 표시되는 Discourse 임베드가 생성됩니다. 하지만 몇 초 후 콘솔 오류가 기록됩니다.
Failed to execute ‘postMessage’ on ‘DOMWindow’: The target origin provided (‘http://localhost:9292’) does not match the recipient window’s origin (‘http://localhost:2368’).
Ghost와 Discourse 각각을 위한 nginx 프록시 두 개를 추가해 보았습니다. 각각 ghost.localhost와 discourse.localhost에서 실행 중입니다. 모든 URL을 프록시로 변경한 후, 오류가 다음과 같이 변했습니다:
Failed to execute ‘postMessage’ on ‘Window’: Invalid target origin ‘’ in a call to ‘postMessage’.
discourseUrl에 http://discourse.localhost/ 대신 http://localhost:9292/를 사용하면 더 이상 오류가 발생하지 않지만, 댓글이 무한 루프에 갇혀 있습니다(몇 초마다 일부 요청을 보내며 “Loading discussions” 상태가 계속 유지됨).