diff --git a/docker-compose.yml b/docker-compose.yml index c954d21..57e297b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -24,6 +24,18 @@ services: - traefik.enable=true - traefik.http.services.homepage.loadbalancer.server.port=80 - traefik.http.routers.homepage.rule=Host(`localhost`) || Host(`127.0.0.1`) || Host(`homepage`) || Host(`6426tqrh4y5uobmo5y2csaip3m3avmjegd2kpa24sadekpxglbm34aqd.onion`) + # ref: https://stackoverflow.com/a/61976953 + # ref: https://github.com/traefik/traefik/issues/563 + - "traefik.http.routers.homepage.middlewares=homepage-redirectregex, homepage-replacepathregex" + + - "traefik.http.middlewares.homepage-replacepathregex.replacepathregex.regex=^/tags/(.*)$$" + - "traefik.http.middlewares.homepage-replacepathregex.replacepathregex.replacement=https://dotya.ml/tags/$$1/" + - "traefik.http.middlewares.homepage-redirectregex.redirectregex.regex=^/tags$$" + - "traefik.http.middlewares.homepage-redirectregex.redirectregex.replacement=https://dotya.ml/tags/" + - "traefik.frontend.redirect.regex=^https://dotya.ml/tags/(.*)$$" + - "traefik.frontend.redirect.replacement=https://dotya.ml/tags/$$1/" + - "traefik.frontend.rule=PathPrefix:/tags;ReplacePathRegex: ^/tags/(.*) /tags/$$1/" + logging: driver: json-file options: