Header Block is a middleware plugin for Traefik to block request by headers which regex matched by their name and/or value
pilot:
token: "xxxxx"
experimental:
plugins:
headerblock:
moduleName: "github.com/wzator/headerblock"
version: "v0.0.2"
- "--experimental.plugins.headerblock.modulename=github.com/wzator/headerblock"
- "--experimental.plugins.headerblock.version=v0.0.2"
http:
middlewares:
headerblock:
plugin:
headerblock:
requestHeaders:
- name: "name"
value: "value"
http:
middlewares:
headerblock:
plugin:
headerblock:
requestHeaders:
- name: "User-Agent"
value: "MJ12bot"
- name: "User-Agent"
value: "Amazonbot"
- name: "User-Agent"
value: "SemrushBot"
- name: "User-Agent"
value: "Applebot"
- name: "User-Agent"
value: "AhrefsBot"
# Settle the ports for the entry points
- "--entrypoints.web.address=:80"
- "--entrypoints.web-secure.address=:443"
- "--entrypoints.web-secure.http.middlewares=headerblock@file${TRAEFIK_PLUGINS:-}"
- "--experimental.plugins.headerblock.modulename=github.com/wzator/headerblock"
- "--experimental.plugins.headerblock.version=v0.0.2"