Allows for filtering Traefik Requests based on parameters that are passed in to the request matching a particular regular expression.
label:
- traefik.http.middlewares.<middlewareName>.traefikFilterOnField.fieldName='<fieldName>'
- traefik.http.middlewares.<middlewareName>.traefikFilterOnField.disallowedContent='<disallowedRegex1>,<disallowedRegex2>'
- traefik.http.middlewares.<middlewareName>.traefikFilterOnField.responseMessage="<Response Message>"
http:
routers:
<routerName>:
service: <serviceName>
middlewares:
- <middlewareName>
middlewares:
<middlewareName>:
plugin:
traefikFilterOnField:
fieldName: <fieldName>
disallowedContent:
- <disallowedRegex1>
- <disallowedRegex2>
responseMessage: <Response Message>
Parameters are approached in the following order:
- PUT or POST Form Fields
- GET Query String Fields.
middleware:
filter-all-requests-with-disallowed-field:
plugin:
traefikFilterOnField:
fieldName: disallowedField
disallowedContent:
# Regex that matches everything...
- .*