Skip to content

Traefik middleware to add a header with the value of a given URL query parameter

License

Notifications You must be signed in to change notification settings

dndll/header-to-queryparameter

 
 

Repository files navigation

Header-to-QueryParameter Middleware

Inverse of forked repo.

Example Traefik config:

[...]
experimental:
  plugins:
    queryParameterToHeader:
      moduleName: github.com/corticph/queryparameter-to-header
      version: v1.0.0

http:
[...]
  routers:
    whoami:
      rule: "Host(`whoami.localhost`)"
      service: "whoami"
      entryPoints:
        - web
      middlewares:
        - add-header-from-query
  
  middlewares:
    add-header-from-query:
      plugin:
        queryParameterToHeader:
          queryParameter: "v"
          header: "X-Version"

About

Traefik middleware to add a header with the value of a given URL query parameter

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 62.1%
  • Nix 37.9%