I am trying to embed Discourse comments into an external site, and getting a CORS-like error in the console of the external site. It is a CKAN site using a 3rd party plugin for Discourse integration (plugin link). Both sites are served over HTTPS.
The Discourse iFrame loads on the external site, there’s a message “Loading Discussion…” that tries to load comments. It reloads the iFrame about every 10 seconds, in a loop.
The error in CKAN console:
Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('https://discourse-site') does not match the recipient window's origin ('https://ckan-site').
In the Discourse error log:
Job exception: SSL_connect returned=1 errno=0 state=error: certificate verify failed
By opening the
env tab, i get the following details.
hostname forum-app process_id [97, 101, 3295, 7109, 174, 98, 104] application_version [ae671355da1db07dedd4a1c927282ce7ce8ecc33, 476ae57af300b6a052318f66a1c84d3e791c0d26, ce7c3bfc14c873b952bb4242d2d2b9ac5ae466d6] current_db default current_hostname discourse-site.com job Jobs::RetrieveTopic problem_db default opts null user_id 3 embed_url [https://ckan-site/dataset/test-003, https://ckan-site/dataset/test-06] referer [https://ckan-site/dataset/test-003, https://ckan-site/dataset/test-06, https://discourse-site/embed/comments?embed_url=https%3A%2F%2Fckan-site%2Fdataset%2Ftest-003, https://discourse-site/embed/comments?embed_url=https%3A%2F%2Fckan-site%2Fdataset%2Ftest-06] current_site_id default