标签:ref policy ror config des requested 出现 block header
Error:前端访问后端时出现如下报错:
Access to XMLHttpRequest at ‘http://localhost:8000/api/slideshow‘ from origin ‘http://localhost:8080‘ has been blocked by CORS policy: No ‘Access-Control-Allow-Origin‘ header is present on the requested resource.
解决:
安装 CORS Middleware for Laravel. (fruitcake /laravel-cors)
The laravel-cors package allows you to send Cross-Origin Resource Sharing headers with Laravel middleware configuration.
has been blocked by CORS policy
标签:ref policy ror config des requested 出现 block header
原文地址:https://blog.51cto.com/12603214/2469042