Blocked by CORS policy
-
I’m running a local server on MAMPs and I’m encountering this problem whenever I try to make a POST request.
Access to XMLHttpRequest at ‘https://localhost/wordpress-5.2.3/wordpress-login/wp-json/wp/v2/posts’ from origin ‘https://localhost:8080’ has been blocked by CORS policy: Response to preflight request doesn’t pass access control check: No ‘Access-Control-Allow-Origin’ header is present on the requested resource.
I have the following set in my .htaccess:
RewriteEngine on
RewriteCond %{HTTP:Authorization} ^(.*)
RewriteRule ^(.*) – [E=HTTP_AUTHORIZATION:%1]
SetEnvIf Authorization “(.*)” HTTP_AUTHORIZATION=$1Any idea what’s going wrong?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Blocked by CORS policy’ is closed to new replies.