我是 Strapi 的新手,我已经下载了 Strapi v4,并且我使用 vue.js 作为前端。
\n现在我创建了类别,并尝试使用我的 vue 应用程序获取这些类别,但我\xe2\x80\x99m 收到 cors 错误。
\nAccess to XMLHttpRequest at \'http://localhost:1337/api/categories\' from origin \'http://localhost:8080\' has been blocked by CORS policy: The value of the \'Access-Control-Allow-Origin\' header in the response must not be the wildcard \'*\' when the request\'s credentials mode is \'include\'. The credentials mode of requests initiated by the XMLHttpRequest is controlled by the withCredentials attribute.\nRun Code Online (Sandbox Code Playgroud)\n在文档中中,我看到我可以覆盖 cors 中间件上的原点,但我不知道怎么做。
\n我\xe2\x80\x99已经尝试过解析,然后设置配置,但这破坏了cms。
\n {\n resolve: \'strapi::cors\',\n config: {\n …Run Code Online (Sandbox Code Playgroud)