Tag Archives: CORS

Apache – Enable Cross-origin resource sharing CORS

Long time ago, we talked about using JSONP to tackle to cross domain ajax issue.
jQuery & JSON – Make Cross Domain Request Using jQuery.getJSON() with JSONP

But this requires server side coding. If you are allow to edit the Apache config, you can simply Enable the CORS (Cross-origin resource sharing) in the VirtualHost file as follow.

1. Enable the mod_headers in Apache by entering the following command in shell.

a2enmod headers

Continue reading Apache – Enable Cross-origin resource sharing CORS

Advertisement