diff --git a/.htaccess b/.htaccess index c32b182..b0bf563 100644 --- a/.htaccess +++ b/.htaccess @@ -118,6 +118,10 @@ DirectoryIndex index.php index.html index.htm RewriteCond %{REQUEST_URI} !core RewriteRule ^ %1/core/%2 [L,QSA,R=301] + # Intercept OPTIONS calls + RewriteCond %{REQUEST_METHOD} OPTIONS + RewriteRule .* / [R=200,L] + # Pass all requests not referring directly to files in the filesystem to # index.php. RewriteCond %{REQUEST_FILENAME} !-f @@ -165,3 +169,7 @@ DirectoryIndex index.php index.html index.htm + +Header always set Access-Control-Allow-Origin "*" +Header always set Access-Control-Allow-Methods "POST, GET, OPTIONS, PATCH, DELETE" +Header always set Access-Control-Allow-Headers: Authorization