ajax - Servers that supports CORS? -


i wonder if there many servers supporting cors?

to make web server support cors, easy making return header.

for example, in apache2, add line applicable conf file:

header set access-control-allow-origin "*"

to more secure (or if don't have access server's conf file) might want not add header in server, add server-side code when want there.

for example in php this: (untested)

<? header('access-control-allow-origin "*"'); ?>


Comments

Popular posts from this blog

forms - Secure PHP File Upload Script -

PHP: Exploding array elements -

c# - Outlook Add-in,group emails based on color category -