From 03f0dfc55d7e23be2ec121eefc72fd2ce50133a4 Mon Sep 17 00:00:00 2001 From: Yanislav Igonin Date: Mon, 28 Feb 2022 11:54:14 +0200 Subject: [PATCH] add middleware to traefik --- docker-compose.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 32620fd..644c933 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -38,18 +38,19 @@ services: traefik.http.services.micrach.loadbalancer.server.port: ${PORT} traefik.http.middlewares.micrach-https-redirect.redirectscheme.scheme: "https" + traefik.http.middlewares.prefixstripper.stripprefix.prefixes: "/${GATEWAY_BOARD_ID}" + traefik.http.middlewares.prefixstripper.stripprefix.forceSlash: "false" traefik.http.routers.micrach.entrypoints: "http" traefik.http.routers.micrach.rule: "Host(`micrach.igonin.dev`) && PathPrefix(`/${GATEWAY_BOARD_ID}`)" traefik.http.routers.micrach.middlewares: "micrach-https-redirect" - - traefik.http.middlewares.micrach-secure.stripprefix.prefixes: "/${GATEWAY_BOARD_ID}" - traefik.http.middlewares.micrach-secure.stripprefix.forceSlash: "false" + traefik.http.routers.micrach.middlewares: "prefixstripper" traefik.http.routers.micrach-secure.entrypoints: "https" traefik.http.routers.micrach-secure.rule: "Host(`micrach.igonin.dev`) && PathPrefix(`/${GATEWAY_BOARD_ID}`)" traefik.http.routers.micrach-secure.tls: "true" traefik.http.routers.micrach-secure.service: "micrach" + traefik.http.routers.micrach-secure.middlewares: "prefixstripper" networks: web: