Heroku + CloudFlare SSL / DNS Issues

Hi,

So l have a bit of a weird problem, its to do with SSL / DNS between Cloudflare + Heroku

The issue is not with connecting to my custom domain through Cloudflare to my app hosted on Heroku.

My actual issue is that my main app on heroku sends a network request (before render, so within NodeJS env) to another Heroku app l have (my API).

When it attempts this request, a few different things happen depending on my configuration / domain l use for the API.

My SSL setting in CloudFlare is set to Full

(apologies can’t give out real domains for now)


  1. SSLv3 handshake failure alert 40
  • UI APP

Heroku domain: ui.herokuapp.com
CloudFlare domain: ui.domain.com (orange cloud)

  • API APP

Heroku domain: api.herokuapp.com
CloudFlare domain: api.domain.com -> api.domain.com.herokudns.com (orange cloud)

  • Scenario

UI app makes a request via fetch to api.domain.com, fails due to SSLv3 handshake failure alert 40


  1. Invalid hostname does not match certificate
  • UI APP

Heroku domain: ui.herokuapp.com
CloudFlare domain: ui.domain.com (orange cloud)

  • API APP

Heroku domain: api.herokuapp.com
CloudFlare domain: api.domain.com -> <<herokuhaiku>>.herokudns.com (orange cloud)

  • Scenario

UI app makes a request via fetch to api.herokuapp.com, fails due to host ui.domain.com is not in heroku DNS:*.herokuapp.com,DNS:herokuapp.com


  1. Redirect loop
  • UI APP

Heroku domain: ui.herokuapp.com
CloudFlare domain: ui.domain.com (orange cloud)

  • API APP

Heroku domain: api.herokuapp.com
CloudFlare domain: api.domain.com -> <<herokuhaiku>>.herokudns.com (orange cloud)

  • Scenario

UI app makes a request via fetch to api.domain.com, redirect loop occurs

UI app makes a request via fetch to api.herokuapp.com, redirect loop occurs


I haven’t found any community posts etc about how to solve this issue, but am open to anything and everything.

I have also raised a ticket for this: #1761409

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.