i'm finding a way to set Access-Control-Allow-Origin: *. on my local site i'm using a scrip to connect to a live script but i need Access-Control-Allow-Origin: set to *
i try this code to httpd.conf
Code <IfModule mod_headers.c>
# Always set these headers.
Header always set Access-Control-Allow-Origin "*"
Header always set Access-Control-Allow-Methods "POST, GET, OPTIONS, DELETE, PUT"
Header always set Access-Control-Max-Age "1000"
Header always set Access-Control-Allow-Headers "x-requested-with, Content-Type, origin, authorization, accept, client-security-token"
# Added a rewrite to respond with a 200 SUCCESS on every OPTIONS request.
RewriteEngine On
RewriteCond %{REQUEST_METHOD} OPTIONS
RewriteRule ^(.*)$ $1 [R=200,L]
</IfModule>
from this tutorial: Setting CORS (cross-origin resource sharing) on Apache with correct response headers allowing everything through
|