我是Laravel的新手,正在使用OAuth2.0密码授权进行一些Laravel 5.3 Passport项目.当我使用params卷曲API时,它会使用令牌进行响应.但是,在浏览器中,它需要端点应添加的额外安全性,因为我的请求来自localhost,而API位于我的VM中.这是错误:
No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8080' is therefore not allowed access. The response had HTTP status code 400.
Run Code Online (Sandbox Code Playgroud)
我知道问题是什么,但我不知道在哪里放入包含该标题,因为这是第三方应用程序.
提前谢谢专家.请帮忙.