traefik 反向代理 + IdentityServer4
traefik 反向代理 + IdentityServer4
原访问地址:http://10.5.84.11:8002
希望访问地址为 http://10.5.84.11:3147/railback
其中3147是traefik的地址
dynamic_conf.toml 配置
[http.routers.railback] rule = "PathPrefix(`/railback`)" entryPoints = ["web"] service = "railback-svc" middlewares = ["railback-strip"] [http.routers.railback-base] rule = "PathPrefix(`/.well-known/`) || PathPrefix(`/connect/token`) || PathPrefix(`/api/abp/application-configuration`) || PathPrefix(`/swagger`) || PathPrefix(`/Account/Login`) || PathPrefix(`/api/app/appAuth/jwt`)" entryPoints = ["web"] service = "railback-svc" priority = 100 [http.routers.railback-operations] rule = "Method(`OPTIONS`)" entryPoints = ["web"] service = "railback-svc" priority = 10 [http.services] [http.services.railback-svc] [http.services.railback-svc.loadBalancer] [[http.services.railback-svc.loadBalancer.servers]] url = "http://10.5.84.11:8002" [http.middlewares] [http.middlewares.railback-strip.stripPrefix] prefixes = ["/railback"]