Ajax request to port 80


#1

Hi,

I am using ember-cli, so I use port 4200 to launch the application. Anyway my backend is an apache with php mysql. My question is: can I launch application on port 4200 and ajax request on port 80?

Defining host in adapter didn’t solved the issue.

Thanks.


#2

You can but you need to enable CORS on your apache backend.

To test your app without CORS run it (ember build) from the apache backend using this .htaccess file in your public folder:

https://github.com/broerse/ember-cli-blog/blob/master/public/.htaccess