V1 到 V2 路径前缀
V1 to V2 PathPrefix
您好,我将 V1 迁移到 V2
我在 v1 中使用这个:
labels:
- "traefik.web.port=8082"
- "traefik.web.frontend.rule=Host:${pom_subdomain}._URL_SITE_"
- "traefik.wss.port=8081"
- "treafik.wss.frontend.entrypoints=ws"
- "traefik.wss.frontend.rule=Host:${pom_subdomain}._URL_SITE_;PathPrefixStrip:/rest"
- "traefik.docker.network=traefik-net"
所以我正在查找文档:https://docs.traefik.io/migration/v1-to-v2/
瞧瞧:
labels:
- "traefik.enable=true"
- "traefik.http.routers.aideopp.entrypoints=web"
- "traefik.http.routers.aideopp.rule=Host(${pom_subdomain}.URL_SITE\)"
- "traefik.http.services.aideopp.loadbalancer.server.port=8082"
- "traefik.http.routers.aideopp-ws.entrypoints=web"
- "traefik.http.routers.aideopp-ws.rule=Host(`${pom_subdomain}.URL_SITE`) && PathPrefix(`/rest`)"
- "traefik.http.services.aideoperateur-ws.loadbalancer.server.port=8081"
- "traefik.docker.network=traefik-net"
但它没有用:/一些body我的眼睛很好
您是否尝试过为“/rest”添加 StripPrefix?
尝试:
- "traefik.http.middlewares.stripprefix-rest.stripprefix.prefixes=/rest"
- "traefik.http.routers.aideopp-ws.middlewares=stripprefix-rest@docker
这对我有用 Docker Swarm。
您好,我将 V1 迁移到 V2
我在 v1 中使用这个:
labels:
- "traefik.web.port=8082"
- "traefik.web.frontend.rule=Host:${pom_subdomain}._URL_SITE_"
- "traefik.wss.port=8081"
- "treafik.wss.frontend.entrypoints=ws"
- "traefik.wss.frontend.rule=Host:${pom_subdomain}._URL_SITE_;PathPrefixStrip:/rest"
- "traefik.docker.network=traefik-net"
所以我正在查找文档:https://docs.traefik.io/migration/v1-to-v2/
瞧瞧:
labels:
- "traefik.enable=true"
- "traefik.http.routers.aideopp.entrypoints=web"
- "traefik.http.routers.aideopp.rule=Host(${pom_subdomain}.URL_SITE\)"
- "traefik.http.services.aideopp.loadbalancer.server.port=8082"
- "traefik.http.routers.aideopp-ws.entrypoints=web"
- "traefik.http.routers.aideopp-ws.rule=Host(`${pom_subdomain}.URL_SITE`) && PathPrefix(`/rest`)"
- "traefik.http.services.aideoperateur-ws.loadbalancer.server.port=8081"
- "traefik.docker.network=traefik-net"
但它没有用:/一些body我的眼睛很好
您是否尝试过为“/rest”添加 StripPrefix?
尝试:
- "traefik.http.middlewares.stripprefix-rest.stripprefix.prefixes=/rest"
- "traefik.http.routers.aideopp-ws.middlewares=stripprefix-rest@docker
这对我有用 Docker Swarm。