Welcome Guest. Please Login or Register  


You are here: Index > AMPPS > General Support > Topic : Access-Control-Allow-Origin: *



Threaded Mode | Print  

 Access-Control-Allow-Origin: * (0 Replies, Read 4243 times)
nonchiedercilaparola
Group: Member
Post Group: Newbie
Posts: 15
Status:
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
IP: --   

« Previous    Next »

Threaded Mode | Print  



Jump To :


Users viewing this topic
1 guests, 0 users.


All times are GMT. The time now is March 29, 2024, 1:57 pm.

  Powered By AEF 1.0.8 © 2007-2008 Electron Inc.Queries: 11  |  Page Created In:0.030