Jaycean edited a comment on issue #1668: URL: https://github.com/apache/apisix-dashboard/issues/1668#issuecomment-806478902
> $ curl http://127.0.0.1:9080/apisix/admin/upstreams/00000000000000000058 -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -i -X PUT -d ' > {"name":"UC-EUREKA", "desc": "UC-EUREKA", "enable_websocket": false, "hash_on": "vars", "nodes": {"172.16.0.123:18088": 1}, "type": "roundrobin"}' > > $ curl http://127.0.0.1:9080/apisix/admin/routes/00000000000000000027 -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -i -d ' > {"name":"uc服务", "priority": 0, "upstream_id": "00000000000000000058", "desc": "uc服务", "hosts": ["testbms.einyun.com"], > "uris": ["/uc/_"], "plugins": {"proxy-rewrite": {"regex_uri": ["/uc/_", "/"]}}}' - Thank you for your reply. I have located the problem. - When the `methods` field data is empty or [], the route supports all methods, but the export does not do relevant adaptation. This is a bug, and I will fix it in the near future. - The fastest way to solve this problem is to add the `methods` field corresponding to the route, such as `"methods": ["DELETE"]`, to ensure that the methods data is not empty, which will not affect the use of the export function. Thks. For example ``` $ curl http://127.0.0.1:9080/apisix/admin/upstreams/00000000000000000058 -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -i -X PUT -d ' {"name":"UC-EUREKA", "desc": "UC-EUREKA", "enable_websocket": false, "hash_on": "vars", "nodes": {"172.16.0.123:18088": 1}, "type": "roundrobin", "methods": ["GET"]}' ``` -- 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: [email protected]
