Hey there,
I wanted to try out Discourse on a local ghost installation.
Basically I’ve set up everything in the easiest way possible; I’ve followed the “Beginners Guide to Install Discourse for Development using Docker” and set up Ghost using its CLI.
Ghost runs on localhost:2368, Discourse on localhost:9292
I’ve added localhost:2368 to the Customize/Embedding allowed hosts (without any settings like class name, path allowlist or post to category).
After adding the code snippet (and ofc properly replacing placeholders) I do have an embed of Discourse which says “Loading discussion…” - but after a few seconds logs a console error
Failed to execute ‘postMessage’ on ‘DOMWindow’: The target origin provided (‘http://localhost:9292’) does not match the recipient window’s origin (‘http://localhost:2368’).
Production instance? I followed the guide the install Discourse locally for development - shouldn’t this be the proper installation for local use? The installation works flawlessly, just the embedding is causing troubles.
I’ve tried adding two nginx proxies, one for Ghost and one for Discourse, running at ghost.localhost and discourse.localhost. After changing all the URLs to the proxies the error has become:
Failed to execute ‘postMessage’ on ‘Window’: Invalid target origin ‘’ in a call to ‘postMessage’.
When using http://localhost:9292/ for the discourseUrl instead of http://discourse.localhost/ there’s no more error, but the comments are stuck in an endless loop (“Loading discussions” forever and doing some requests every few seconds).