tech-microworld / ws-cloud-gateway

基于 openresty + etcd 实现的轻量级网关服务
https://tech-microworld.github.io/ws-cloud/gateway/
Apache License 2.0
82 stars 26 forks source link

更新路由会把路由删除 #42

Closed ss1917 closed 2 years ago

ss1917 commented 2 years ago
-- 如果路由前缀修改了,需要删除之前的路由配置
if err == nil and key and key ~= route.prefix then
    _, err = remove_route(key)
end

路由修改后都被删除了,应该为这样

if err == nil and key and key ~= create_key(route.prefix) then
    _, err = remove_route(key)
end
fengjx commented 2 years ago

已解决