add to .htaccess
This commit is contained in:
@@ -26,6 +26,14 @@ Options All -Indexes
|
||||
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
|
||||
RewriteRule ^ http://%1%{REQUEST_URI} [R=301,L]
|
||||
|
||||
#Redirect for CORS Preflight request
|
||||
RewriteCond %{REQUEST_METHOD} OPTIONS
|
||||
RewriteRule ^(.*)$ $1 [R=200,L]
|
||||
#Set headers to access CORS Requests / allowing localhost only
|
||||
Header always add Access-Control-Allow-Origin "*"
|
||||
Header always add Access-Control-Allow-Headers "origin, x-requested-with, content-type"
|
||||
Header always add Access-Control-Allow-Methods "PUT, GET, POST, DELETE, OPTIONS"
|
||||
|
||||
# Checks to see if the user is attempting to access a valid file,
|
||||
# such as an image or css document, if this isn't true it sends the
|
||||
# request to the front controller, index.php
|
||||
|
||||
Reference in New Issue
Block a user