Numerous CORS errors on self hosted Ghost installation ( Digital Ocean )

Hi everyone,

I’m running Ghost within a Digital-Ocean droplet.
I want all www-Traffic to be redirected to non-www-pages, so I successfully added the necessary nginx-redirects. So far, so good.
Now, all of the subscription / API calls do not work anymore. Are these hard-coded to be www.-requests? Why does someone want to do that?
Anyway - I need help with this and I hope that there’s better option instead of giving manually each of these requests access - including the portal.

Thanks in advance
Daniel

Make sure the url configured in Ghost (ghost config get url) matches with what your primary domain will be :slight_smile:

2 Likes

Fun fact: I had the same idea at the same time. And yes - that was the issue. I couldn’t find another explanation for my problem because the nginx-configuration already was correct and the test run was valid. Anyway - thanks a lot for the immediate help.

1 Like

I’m running Ghost within a Digital-Ocean droplet.
I want all www-Traffic to be redirected to non-www-pages, so I successfully added the necessary nginx-redirects. So far, so good.

Now, all of the subscription / API calls do not work anymore. Are these hard-coded to be www.-requests? Why does someone want to do that?

Anyway - I need help with this and I hope that there’s better option instead of giving manually each of these requests access - including the portal.

First Motion Products

@klausfelix it sounds like you need to follow the advice above

If you have your url configured in Ghost as the www version then all of the requests will be made to your www url (and subsequently fail CORS if you’re redirecting away from the configured url)

1 Like