You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2021/06/02 07:56:58 UTC

[GitHub] [apisix] suifff opened a new issue #4358: request help: apisix cannot use CORS plug-in after upgrading from 2.0 to 2.5

suifff opened a new issue #4358:
URL: https://github.com/apache/apisix/issues/4358


   ### Issue description
   I used docker deployment, and apisix-dashboard was upgraded from 2.1 to 2.6
   
   ### Environment
   
   docker-compose.yml
   ~~~
   version: "3"
   
   services:
     apisix:
       #image: apache/apisix:2.0-alpine
       image: apache/apisix:2.5-alpine
       restart: always
       volumes:
         - ./apisix_log:/usr/local/apisix/logs
         - ./apisix_conf/config.yaml:/usr/local/apisix/conf/config.yaml:ro
       depends_on:
         - etcd
       ##network_mode: host
       ports:
         - "80:9080/tcp"
         - "443:9443/tcp"
   #      - "9080:9080/tcp"
   #      - "9443:9443/tcp"
       networks:
         apisix:
           ipv4_address: 172.20.5.11
   
     etcd:
       image: bitnami/etcd:3.4.9
       user: root
       restart: always
       volumes:
         - ./etcd_data:/etcd_data
       environment:
         ETCD_DATA_DIR: /etcd_data
         ETCD_ENABLE_V2: "true"
         ALLOW_NONE_AUTHENTICATION: "yes"
         ETCD_ADVERTISE_CLIENT_URLS: "http://0.0.0.0:2379"
         ETCD_LISTEN_CLIENT_URLS: "http://0.0.0.0:2379"
       ports:
         - "2379:2379/tcp"
       networks:
         apisix:
           ipv4_address: 172.20.5.10
   
     apisix-dashboard:
       container_name: apisix-dashboard
       #image: apache/apisix-dashboard:2.1
       image: apache/apisix-dashboard:2.6
       ports:
         - 9000:9000
       volumes:
         - ./apisix-dashboard/conf.yaml:/usr/local/apisix-dashboard/conf/conf.yaml
       networks:
         apisix:
           ipv4_address: 172.20.5.18
   
   
   networks:
     apisix:
       driver: bridge
       ipam:
         config:
         - subnet: 172.20.0.0/16
   ~~~
   
   Now CORS is no longer accessible
   ![image](https://user-images.githubusercontent.com/37427008/120444980-c1577600-c3ba-11eb-94ca-37de1c284b37.png)
   
   This is the configuration of CORS 
   ![image](https://user-images.githubusercontent.com/37427008/120445320-14312d80-c3bb-11eb-96d0-5d59b96ff3a7.png)
   


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] spacewander commented on issue #4358: request help: apisix cannot use CORS plug-in after upgrading from 2.0 to 2.5 and partial route failure

Posted by GitBox <gi...@apache.org>.
spacewander commented on issue #4358:
URL: https://github.com/apache/apisix/issues/4358#issuecomment-853543030


   So it can't be reproduced now after restarting APISIX?


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] suifff edited a comment on issue #4358: request help: apisix cannot use CORS plug-in after upgrading from 2.0 to 2.5 and partial route failure

Posted by GitBox <gi...@apache.org>.
suifff edited a comment on issue #4358:
URL: https://github.com/apache/apisix/issues/4358#issuecomment-853931635


   > Can you provide a pasteable configuration so we can try it?
   > Also, any interesting thing in the error.log?
   
   There is no error log in the new request. When I restart, I found that there was an error log in apisix
   
   ![image](https://user-images.githubusercontent.com/37427008/120665381-4c6d6480-c4be-11eb-921c-fc0e39931d5e.png)
   
   


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] nic-chen commented on issue #4358: request help: apisix cannot use CORS plug-in after upgrading from 2.0 to 2.5 and partial route failure

Posted by GitBox <gi...@apache.org>.
nic-chen commented on issue #4358:
URL: https://github.com/apache/apisix/issues/4358#issuecomment-853961351


   > The error:
   ```{"error_msg":"failed to check the configuration of plugin cors err: you can not set '*' for other option when 'allow_credential' is true"}```
   is validate by lua code.This can't be validated in apisix-dashboard.
   
   That's it.


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] suifff edited a comment on issue #4358: request help: apisix cannot use CORS plug-in after upgrading from 2.0 to 2.5 and partial route failure

Posted by GitBox <gi...@apache.org>.
suifff edited a comment on issue #4358:
URL: https://github.com/apache/apisix/issues/4358#issuecomment-853538244






-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] nic-chen commented on issue #4358: request help: apisix cannot use CORS plug-in after upgrading from 2.0 to 2.5 and partial route failure

Posted by GitBox <gi...@apache.org>.
nic-chen commented on issue #4358:
URL: https://github.com/apache/apisix/issues/4358#issuecomment-853961351


   > The error:
   ```{"error_msg":"failed to check the configuration of plugin cors err: you can not set '*' for other option when 'allow_credential' is true"}```
   is validate by lua code.This can't be validated in apisix-dashboard.
   
   That's it.


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] suifff edited a comment on issue #4358: request help: apisix cannot use CORS plug-in after upgrading from 2.0 to 2.5 and partial route failure

Posted by GitBox <gi...@apache.org>.
suifff edited a comment on issue #4358:
URL: https://github.com/apache/apisix/issues/4358#issuecomment-853538244


   > Can you provide a pasteable configuration so we can try it?
   > Also, any interesting thing in the error.log?
   
   You may not be able to reproduce it. It's normal for me to create a new route. Is there a cache problem? How can I clean apisix's cache


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] suifff commented on issue #4358: request help: apisix cannot use CORS plug-in after upgrading from 2.0 to 2.5 and partial route failure

Posted by GitBox <gi...@apache.org>.
suifff commented on issue #4358:
URL: https://github.com/apache/apisix/issues/4358#issuecomment-853538244






-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] starsz commented on issue #4358: request help: apisix cannot use CORS plug-in after upgrading from 2.0 to 2.5 and partial route failure

Posted by GitBox <gi...@apache.org>.
starsz commented on issue #4358:
URL: https://github.com/apache/apisix/issues/4358#issuecomment-853935998


   > I have tried use the cors with apisix admin-api, but got error:
   > 
   > ```shell
   > curl http://127.0.0.1:9080/apisix/admin/routes/2 -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -i -d '
   > {
   >     "uri": "/*",
   >     "hosts": ["foo.com"],
   >     "upstream": {
   >         "type": "roundrobin",
   >         "nodes": {
   >             "httpbin.org": 1
   >         }
   >     },
   >     "plugins": {
   >         "cors": {
   >          "allow_credential": true,
   >          "allow_headers": "*",
   >          "allow_methods": "*",
   >          "allow_origins": "*",
   >          "expose_headers": "*",
   >          "max_age": 5
   >         }
   >     }
   > }'
   > ```
   > 
   > Got error as below
   > 
   > ```shell
   > {"error_msg":"failed to check the configuration of plugin cors err: you can not set '*' for other option when 'allow_credential' is true"}
   > ```
   > 
   > It seems that when the cors plug-in is created through the dashboard, there is no shcema verification about this.
   > And APISIX will get error , when watch the change about cors plugin from etcd.
   > 
   > It is a bug in dashboard.
   > 
   > cc @nic-chen @starsz
   
   In fact, the dashboard had schema verification about this :
   you can referer: 
   
   https://github.com/apache/apisix-dashboard/blob/9850df28b9539713566849069ba093b6be7c3be7/api/conf/schema.json#L2458
   
   The error:
   ```
   {"error_msg":"failed to check the configuration of plugin cors err: you can not set '*' for other option when 'allow_credential' is true"}
   ```
   is validate by lua code.This can't be validated in apisix-dashboard.
   
   you can referer to:
   https://github.com/apache/apisix/blob/c61261af8d19557b77535c9c745f4f8182bb63b2/apisix/plugins/cors.lua#L134-L137
   


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] spacewander commented on issue #4358: request help: apisix cannot use CORS plug-in after upgrading from 2.0 to 2.5

Posted by GitBox <gi...@apache.org>.
spacewander commented on issue #4358:
URL: https://github.com/apache/apisix/issues/4358#issuecomment-852840374


   What is your configure data in the etcd?


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] spacewander commented on issue #4358: request help: apisix cannot use CORS plug-in after upgrading from 2.0 to 2.5 and partial route failure

Posted by GitBox <gi...@apache.org>.
spacewander commented on issue #4358:
URL: https://github.com/apache/apisix/issues/4358#issuecomment-853543030


   So it can't be reproduced now after restarting APISIX?


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] suifff commented on issue #4358: request help: apisix cannot use CORS plug-in after upgrading from 2.0 to 2.5

Posted by GitBox <gi...@apache.org>.
suifff commented on issue #4358:
URL: https://github.com/apache/apisix/issues/4358#issuecomment-852867501


   > Does apisix have any related error log prompts?
   
   @Firstsawyou yes,I upgraded in the newly opened docker compose, and found that the routing difference is not big, but it cannot be accessed after upgrading. After upgrading, an interface is 404
   
   ![image](https://user-images.githubusercontent.com/37427008/120456107-e30b2a00-c3c7-11eb-8533-5bfee989c004.png)
   ![image](https://user-images.githubusercontent.com/37427008/120456300-0afa8d80-c3c8-11eb-8795-0f3bdd7de9c0.png)
   ![image](https://user-images.githubusercontent.com/37427008/120456374-1d74c700-c3c8-11eb-896c-f8679359b772.png)
   
   
   


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] Firstsawyou commented on issue #4358: request help: apisix cannot use CORS plug-in after upgrading from 2.0 to 2.5

Posted by GitBox <gi...@apache.org>.
Firstsawyou commented on issue #4358:
URL: https://github.com/apache/apisix/issues/4358#issuecomment-852861992


   Does apisix have any related error log prompts?


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] suifff commented on issue #4358: request help: apisix cannot use CORS plug-in after upgrading from 2.0 to 2.5 and partial route failure

Posted by GitBox <gi...@apache.org>.
suifff commented on issue #4358:
URL: https://github.com/apache/apisix/issues/4358#issuecomment-853538244


   > Can you provide a pasteable configuration so we can try it?
   > Also, any interesting thing in the error.log?
   
   You may not be able to reproduce it. It's normal for me to create a new route. Is there a cache problem


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] suifff commented on issue #4358: request help: apisix cannot use CORS plug-in after upgrading from 2.0 to 2.5 and partial route failure

Posted by GitBox <gi...@apache.org>.
suifff commented on issue #4358:
URL: https://github.com/apache/apisix/issues/4358#issuecomment-853931635


   > Can you provide a pasteable configuration so we can try it?
   > Also, any interesting thing in the error.log?
   
   There is no error log in the new request. When I restart, I found that there was an error log in apimix
   
   ![image](https://user-images.githubusercontent.com/37427008/120665381-4c6d6480-c4be-11eb-921c-fc0e39931d5e.png)
   
   


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] gxthrj commented on issue #4358: request help: apisix cannot use CORS plug-in after upgrading from 2.0 to 2.5 and partial route failure

Posted by GitBox <gi...@apache.org>.
gxthrj commented on issue #4358:
URL: https://github.com/apache/apisix/issues/4358#issuecomment-853925334


   I have tried use the cors with apisix admin-api, but got error:
   ```shell
   curl http://127.0.0.1:9080/apisix/admin/routes/2 -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -i -d '
   {
       "uri": "/*",
       "hosts": ["foo.com"],
       "upstream": {
           "type": "roundrobin",
           "nodes": {
               "httpbin.org": 1
           }
       },
       "plugins": {
           "cors": {
            "allow_credential": true,
            "allow_headers": "*",
            "allow_methods": "*",
            "allow_origins": "*",
            "expose_headers": "*",
            "max_age": 5
           }
       }
   }'
   ```
   
   Got error as below
   
   ```shell
   {"error_msg":"failed to check the configuration of plugin cors err: you can not set '*' for other option when 'allow_credential' is true"}
   ```
   
   It seems that when the cors plug-in is created through the dashboard, there is no shcema verification about this.


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] spacewander commented on issue #4358: request help: apisix cannot use CORS plug-in after upgrading from 2.0 to 2.5 and partial route failure

Posted by GitBox <gi...@apache.org>.
spacewander commented on issue #4358:
URL: https://github.com/apache/apisix/issues/4358#issuecomment-853024986


   Can you provide a pasteable configuration so we can try it?
   Also, any interesting thing in the error.log?


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] suifff commented on issue #4358: request help: apisix cannot use CORS plug-in after upgrading from 2.0 to 2.5 and partial route failure

Posted by GitBox <gi...@apache.org>.
suifff commented on issue #4358:
URL: https://github.com/apache/apisix/issues/4358#issuecomment-853927593


   > I have tried use the cors with apisix admin-api, but got error:
   > 
   > ```shell
   > curl http://127.0.0.1:9080/apisix/admin/routes/2 -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -i -d '
   > {
   >     "uri": "/*",
   >     "hosts": ["foo.com"],
   >     "upstream": {
   >         "type": "roundrobin",
   >         "nodes": {
   >             "httpbin.org": 1
   >         }
   >     },
   >     "plugins": {
   >         "cors": {
   >          "allow_credential": true,
   >          "allow_headers": "*",
   >          "allow_methods": "*",
   >          "allow_origins": "*",
   >          "expose_headers": "*",
   >          "max_age": 5
   >         }
   >     }
   > }'
   > ```
   > 
   > Got error as below
   > 
   > ```shell
   > {"error_msg":"failed to check the configuration of plugin cors err: you can not set '*' for other option when 'allow_credential' is true"}
   > ```
   > 
   > It seems that when the cors plug-in is created through the dashboard, there is no shcema verification about this.
   
   Thank you. I will modify this route through the apifix interface


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] starsz commented on issue #4358: request help: apisix cannot use CORS plug-in after upgrading from 2.0 to 2.5 and partial route failure

Posted by GitBox <gi...@apache.org>.
starsz commented on issue #4358:
URL: https://github.com/apache/apisix/issues/4358#issuecomment-853935998


   > I have tried use the cors with apisix admin-api, but got error:
   > 
   > ```shell
   > curl http://127.0.0.1:9080/apisix/admin/routes/2 -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -i -d '
   > {
   >     "uri": "/*",
   >     "hosts": ["foo.com"],
   >     "upstream": {
   >         "type": "roundrobin",
   >         "nodes": {
   >             "httpbin.org": 1
   >         }
   >     },
   >     "plugins": {
   >         "cors": {
   >          "allow_credential": true,
   >          "allow_headers": "*",
   >          "allow_methods": "*",
   >          "allow_origins": "*",
   >          "expose_headers": "*",
   >          "max_age": 5
   >         }
   >     }
   > }'
   > ```
   > 
   > Got error as below
   > 
   > ```shell
   > {"error_msg":"failed to check the configuration of plugin cors err: you can not set '*' for other option when 'allow_credential' is true"}
   > ```
   > 
   > It seems that when the cors plug-in is created through the dashboard, there is no shcema verification about this.
   > And APISIX will get error , when watch the change about cors plugin from etcd.
   > 
   > It is a bug in dashboard.
   > 
   > cc @nic-chen @starsz
   
   In fact, the dashboard had schema verification about this :
   you can referer: 
   
   https://github.com/apache/apisix-dashboard/blob/9850df28b9539713566849069ba093b6be7c3be7/api/conf/schema.json#L2458
   
   The error:
   ```
   {"error_msg":"failed to check the configuration of plugin cors err: you can not set '*' for other option when 'allow_credential' is true"}
   ```
   is validate by lua code.This can't be validated in apisix-dashboard.
   
   you can referer to:
   https://github.com/apache/apisix/blob/c61261af8d19557b77535c9c745f4f8182bb63b2/apisix/plugins/cors.lua#L134-L137
   


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] suifff commented on issue #4358: request help: apisix cannot use CORS plug-in after upgrading from 2.0 to 2.5

Posted by GitBox <gi...@apache.org>.
suifff commented on issue #4358:
URL: https://github.com/apache/apisix/issues/4358#issuecomment-852846998


   > What is your configure data in the etcd?
   
   @spacewander 通过etcdctl get --prefix /获取的值解析如下
   ~~~
   	"plugins": {
   		"cors": {
   			"allow_credential": true,
   			"allow_headers": "*",
   			"allow_methods": "*",
   			"allow_origins": "*",
   			"allow_origins_by_regex": ["*"],
   			"disable": false,
   			"expose_headers": "*",
   			"max_age": 5
   		}
   	},
   	"upstream_id": "345046292138819799",
   	"status": 1
   }
   ~~~


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] spacewander commented on issue #4358: request help: apisix cannot use CORS plug-in after upgrading from 2.0 to 2.5 and partial route failure

Posted by GitBox <gi...@apache.org>.
spacewander commented on issue #4358:
URL: https://github.com/apache/apisix/issues/4358#issuecomment-852941017


   It is a known bug: https://github.com/apache/apisix/pull/4056


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] gxthrj edited a comment on issue #4358: request help: apisix cannot use CORS plug-in after upgrading from 2.0 to 2.5 and partial route failure

Posted by GitBox <gi...@apache.org>.
gxthrj edited a comment on issue #4358:
URL: https://github.com/apache/apisix/issues/4358#issuecomment-853925334


   I have tried use the cors with apisix admin-api, but got error:
   ```shell
   curl http://127.0.0.1:9080/apisix/admin/routes/2 -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -i -d '
   {
       "uri": "/*",
       "hosts": ["foo.com"],
       "upstream": {
           "type": "roundrobin",
           "nodes": {
               "httpbin.org": 1
           }
       },
       "plugins": {
           "cors": {
            "allow_credential": true,
            "allow_headers": "*",
            "allow_methods": "*",
            "allow_origins": "*",
            "expose_headers": "*",
            "max_age": 5
           }
       }
   }'
   ```
   
   Got error as below
   
   ```shell
   {"error_msg":"failed to check the configuration of plugin cors err: you can not set '*' for other option when 'allow_credential' is true"}
   ```
   
   It seems that when the cors plug-in is created through the dashboard, there is no shcema verification about this.
   And APISIX will get error , when watch the change about cors plugin from etcd.
   
   It is a bug in dashboard.
   
   cc @nic-chen @starsz 


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] gxthrj commented on issue #4358: request help: apisix cannot use CORS plug-in after upgrading from 2.0 to 2.5 and partial route failure

Posted by GitBox <gi...@apache.org>.
gxthrj commented on issue #4358:
URL: https://github.com/apache/apisix/issues/4358#issuecomment-853925334


   I have tried use the cors with apisix admin-api, but got error:
   ```shell
   curl http://127.0.0.1:9080/apisix/admin/routes/2 -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -i -d '
   {
       "uri": "/*",
       "hosts": ["foo.com"],
       "upstream": {
           "type": "roundrobin",
           "nodes": {
               "httpbin.org": 1
           }
       },
       "plugins": {
           "cors": {
            "allow_credential": true,
            "allow_headers": "*",
            "allow_methods": "*",
            "allow_origins": "*",
            "expose_headers": "*",
            "max_age": 5
           }
       }
   }'
   ```
   
   Got error as below
   
   ```shell
   {"error_msg":"failed to check the configuration of plugin cors err: you can not set '*' for other option when 'allow_credential' is true"}
   ```
   
   It seems that when the cors plug-in is created through the dashboard, there is no shcema verification about this.


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] suifff commented on issue #4358: request help: apisix cannot use CORS plug-in after upgrading from 2.0 to 2.5 and partial route failure

Posted by GitBox <gi...@apache.org>.
suifff commented on issue #4358:
URL: https://github.com/apache/apisix/issues/4358#issuecomment-853544551


   > So it can't be reproduced now after restarting APISIX?
   
   No


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] suifff commented on issue #4358: request help: apisix cannot use CORS plug-in after upgrading from 2.0 to 2.5 and partial route failure

Posted by GitBox <gi...@apache.org>.
suifff commented on issue #4358:
URL: https://github.com/apache/apisix/issues/4358#issuecomment-852950101


   > It is a known bug: #4056
   
   2.6 doesn't work
   
   ![image](https://user-images.githubusercontent.com/37427008/120472875-025e8300-c3d9-11eb-8176-b345989f8c7b.png)
   


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] Firstsawyou commented on issue #4358: request help: apisix cannot use CORS plug-in after upgrading from 2.0 to 2.5

Posted by GitBox <gi...@apache.org>.
Firstsawyou commented on issue #4358:
URL: https://github.com/apache/apisix/issues/4358#issuecomment-852836091


   You try to request via curl to see if it works? like this:  https://github.com/apache/apisix/blob/master/docs/en/latest/plugins/cors.md#how-to-enable


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] gxthrj edited a comment on issue #4358: request help: apisix cannot use CORS plug-in after upgrading from 2.0 to 2.5 and partial route failure

Posted by GitBox <gi...@apache.org>.
gxthrj edited a comment on issue #4358:
URL: https://github.com/apache/apisix/issues/4358#issuecomment-853925334


   I have tried use the cors with apisix admin-api, but got error:
   ```shell
   curl http://127.0.0.1:9080/apisix/admin/routes/2 -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -i -d '
   {
       "uri": "/*",
       "hosts": ["foo.com"],
       "upstream": {
           "type": "roundrobin",
           "nodes": {
               "httpbin.org": 1
           }
       },
       "plugins": {
           "cors": {
            "allow_credential": true,
            "allow_headers": "*",
            "allow_methods": "*",
            "allow_origins": "*",
            "expose_headers": "*",
            "max_age": 5
           }
       }
   }'
   ```
   
   Got error as below
   
   ```shell
   {"error_msg":"failed to check the configuration of plugin cors err: you can not set '*' for other option when 'allow_credential' is true"}
   ```
   
   It seems that when the cors plug-in is created through the dashboard, there is no shcema verification about this.
   And APISIX will get error , when watch the change about cors plugin from etcd.
   
   It is a bug in dashboard.
   
   cc @nic-chen @starsz 


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] suifff commented on issue #4358: request help: apisix cannot use CORS plug-in after upgrading from 2.0 to 2.5

Posted by GitBox <gi...@apache.org>.
suifff commented on issue #4358:
URL: https://github.com/apache/apisix/issues/4358#issuecomment-852848231


   ![image](https://user-images.githubusercontent.com/37427008/120450876-7726c280-c3c3-11eb-90af-333494d4a80f.png)
   


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org