Access DB from subdomain - Request Blocked


#1

Hi,

I set up a MySQL Database and could access it from my domain. Then I created a new subdomain and tried to access my DB with it, but I have no luck. I entered the subdomain and the subdomain ip in the allowable users list of my DB but accessing the DB with the subdomain doesn’t succeed.

In the browser I found this console output: Cross-Origin Request blocked. Reason: CORS-Header ‘Access-Control-Allow-Origin’ is missing.

This might just be a security measurement but what can I do in order to make the communication between the DB and the subdomain work?


#2

Sorry to hear of the problems.

Just to clarify, this is a database and website and subdomain hosted with DreamHost? The error message you replied with, about CORS headers, is a very specific error message you will see with cloud storage in general. Are you hosting files from DreamObjects? This error could be that images or other assets aren’t loading and causing the page to appear to not work. There are ways to set the CORS rules, covered in the below article, and if you think you still have issues with it please open and support request and we’ll take a look.