Use a JWT field as header value to, for example, use it as a rate limiting key. This middleware will add the JWT field as header value to the request or if the jwt is not set/valid it will use different fallback strategies.
debug: "true" # Boolean to enable debug mode, prints debug messages to the traefik logjwtHeaderName: Authorization # Name of the header that contains the JWTjwtField: customer_id # Name of the JWT field that will be used as header valuevalueHeaderName: X-Rate-Limit # Name of the header that will be added to the requestfallbacks: # List of fallback strategies- type: header # Type of the fallback strategy, one of: header, ip, pass, errorvalue: x-apikey # For the header strategy, the name of the header that will be used as header valuekeepIfEmpty: "true" # If true uses this fallback strategy even if the header is empty- type: ip # For the ip strategy, the remote address will be used as header value- type: error # For the error strategy, the request will be aborted with a 400 error- type: pass # For the pass strategy, the request will be passed without adding a header