A11enHuang opened a new issue #50:
URL: https://github.com/apache/apisix-go-plugin-runner/issues/50


   APISIX VERSION:  2.10
   APISIX-GO-PLUGIN VERSION: 0.2.0
   
   问题描述:
   在配置了plugin的情况下,前端调用后端接口会导致跨域。
   本来就是从不同的域访问过来的,可是在APISIX的配置中已经允许所有的来源访问了。
   但是在加了go-plugin的情况下就会报跨域。
   
   APISIX配置如下:
   "plugins": {
           "proxy-rewrite": {
               "regex_uri": [
                   "^/v1/admin/(.*)",
                   "/${1}"
               ],
               "headers":{
                   "X-Forwarded-Prefix":"/v1/admin"
               }
           },
           "cors": {},
           "request-id": {
               "include_in_response": true
           },
           "ext-plugin-pre-req": {
               "conf": [
                   {
                       "name": "MicroserviceFilter",
                       "value": "{\"strip_prefix\":1}"
                   }
               ]
           }
       }
   
   前端报错信息:
   Access to fetch at 'xxxxx' from origin 'xxx' has been blocked by CORS 
policy: Response to preflight request doesn't pass access control check: It 
does not have HTTP ok status.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to