Reputation: 1000
I have set up a Parse Server on Heroku, with an MLab MongoDB. Everything works fine, & when I visit https://myapp.herokuapp.com I see "Make sure to star the parse-server repo on GitHub!".
I can successfully perform API functions through my Postman Console, for example logging in via the following REST API call: https://myapp.herokuapp.com/parse/login?username=admin&password=password.
I can also perform other REST API POST, GET, etc. as you would expect.
I'm now trying to use my own domain "api.mydomain.net". In the Heroku App > Settings > Custom Domains, I have set domain to "api.mydomain.net" & "myapp.herokuapp.com" as the DNS target.
I've also added a CNAME record to the DNS pointing "api" to "myapp.herokuapp.com".
When I visit https://api.mydomain.net I see the "Make sure to star the parse-server repo on GitHub!" message confirming that the CNAME record works, however when I go to perform the same REST API Login call https://api.mydomain.net/parse/login?username=admin&password=password I get the response:
Could not get any response.
This seems to be like an error connecting to https://api.mydomain.net/parse/login?username=admin&password=password.
What am I missing?
Upvotes: 2
Views: 266
Reputation: 15042
You are trying to securely connect to the Parse Server with https
. So you have to add a TSL certificate for your Heroku app in the Heroku dashboard.
Automatically configure using Automated Certificate Management
.Add domain
to add the domain from which the request should be forwarded, e.g. api.example.com
.CNAME
for api.example.com
to the domain in the Heroku app settings, e.g. api.example.com.herokudns.com
Done
Upvotes: 0