Referer embeding problems - x does not match x

I’ve run in circles trying to figure out why this embed isn’t working:


It seems like it’s receiving the referer just fine but not putting two and two together. I’ve scanned around for relevant topics and couldn’t find any with this particular issue. Could it be something to do with the .quest TLD?

2 Likes

That does look correct, any ideas @eviltrout?

This is quite interesting as it should indeed match.

I’m curious if your request is including the topic_id? I can see a code path that might show this error by mistake if the topic is missing.

1 Like

Are you running latest Discourse? We removed the referer check from most places when embeding nowadays.

2 Likes

I’m trying to use the discourseEmbedUrl setup for this site. My comment component is on github but the gist is:

    window.DiscourseEmbed = {
      discourseUrl: siteMetadata.comment.discourseConfig.url,
      discourseEmbedUrl: thread,
      discourseReferrerPolicy: 'no-referrer-when-downgrade',
    }

where thread = window.location.href

I’ve played around with configs a bit and now I’m getting the full url as Referer, but still it ‘doesn’t match’. You can see this at the bottom of the page on the blog

Edit: I was running 2.8.0.beta10, I just updated to 2.8.0.beta11 and it’s still the same. The only other monkey wrench I can think of is that this Discourse instance started out on another url and was migrated (forked, really). Everything else works fine though so I have no reason to think the migration went wrong.

1 Like

I would check your topic_embed records in the database to make sure they are correct. The migration from the URL probably did not update those.

1 Like

That sounds like a good place to check, downloading the data explorerer now…
Another interesting data point - everything’s working fine on our other site, vote.hencommunity.quest

Plugin installed, SELECT * FROM topic_embeds pulls up 8 results, all from this vote.hencommunity.quest url, nothing from the main hencommunity.quest blog I’m trying to get working.

1 Like