(Cloudfare SSL): Cannot fetch Discourse feed JSON

Hi everyone.

I am trying to fetch Discourse json feed ( posts.json )

My main website is hosted on domain.com
And discourse on discourse.domain.com

I am using cloudflare, and ssl certificate is activated ( flexible ).

My issue is, when try to fetch discourse.domain.com/posts.json from domain.com, I am getting an error.

Strange thing is, it works from any other websites ( even localhost :face_with_raised_eyebrow: )
But when I fetch the feed from the same domain name, it doesn’t work :thinking:

A temporary solution that I have found is to use Discourse direct ip, but it’s not ideal.

I’ve tried to setup let’s encrypt, and use full ssl cloudflare option, but it won’t work either.

Another thing is, I have install wordpress on a subdomain for testing, and I wasn’t able to connect to discourse ( I suspect Cloudflare ssl once more )

Is anyone having the same issue ?
Thanks

We always recommend disabling Cloudflare special features (make the cloud gray) and use our baked SSL (run ./discourse-setup again).

After doing all that you can share your domain here and we can check for more.

4 Likes

Cloudflare only needs to be disabled for the initial certificate issuance, renewals run fine, as does the CDN side of things. Enabling cache level ‘standard’ on /uploads/* will allow images and other attachments to be served from their CDN.

The only thing that really has to be disabled is their ‘performance’ stuff. A single rule will achieve that:

That shuts off minification, rocket loader, mirage and polish.

4 Likes

Hi @Falco and @Stephen, thanks for your answers.
Well I am quite sure it’s an issue with cloudflare ssl.

When I try it on a website unencrypted (htttp:// ) everything works fine!

I’ve tried everything ( bypass cache, performance, security, apps… ).

I’ll contact Cloudflare support to see if they have a solution. :crossed_fingers:

Were you able to generate a let’s encrypt certificate with cloudflare disabled?

Well I have already installed let’s encrypt, it helps if you want to use strict ssl with Cloudflare.

Do you know if I can stay on Cloudflare, and use my server certificate instead ( let’s encrypt) ?

Yes full SSL doesn’t work unless the downstream server also has a certificate.

3 Likes