Skip to content

Path filter #20

Description

@muratcorlu

Describe the solution you'd like
It would be great to be able to replacement for a specific path prefix without needing to define a new traefik router.

services:
  mysite:
    ...
    labels:
      traefik.http.middlewares.my-injector.plugin.rewritebody.rewrites[0].regex: </body>
      traefik.http.middlewares.my-injector.plugin.rewritebody.rewrites[0].pathPrefix: /admin
      traefik.http.middlewares.my-injector.plugin.rewritebody.rewrites[0].replacement: <script src="admin-analytics.js"></script></body>
      traefik.http.routers.mysite.rule: Host(`mysite.com`)
      traefik.http.routers.mysite.service: mysite

Describe alternatives you've considered
I think this is currently possible by creating a separate route definition that points same service. But that add too much repeating and crowd.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions