README ¶ traefik-block-ua traefik-block-ua is a traefik plugin to whitelist requests based on the user agents Configuration Static Local experimental: localPlugins: geoblock: moduleName: github.com/kucjac/traefik-block-ua Pilot pilot: token: "xxxxxxxxx" experimental: plugins: userAgentBlocker: moduleName: github.com/kucjac/traefik-block-ua version: v0.1.0 Dynamic http: middlewares: userAgentBlocker: plugin: userAgentBlocker: userAgents: - "CustomCrawlerName" Expand ▾ Collapse ▴ Documentation ¶ Index ¶ func New(_ context.Context, next http.Handler, cfg *Config, name string) (http.Handler, error) type Config func CreateConfig() *Config type Plugin func (p *Plugin) ServeHTTP(rw http.ResponseWriter, req *http.Request) Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func New ¶ func New(_ context.Context, next http.Handler, cfg *Config, name string) (http.Handler, error) New creates a new plugin handler. Types ¶ type Config ¶ type Config struct { UserAgents []string } Config defines the plugin dynamic configuration. func CreateConfig ¶ func CreateConfig() *Config CreateConfig creates a new config. type Plugin ¶ type Plugin struct { // contains filtered or unexported fields } Plugin is the traefik plugin implementation. func (*Plugin) ServeHTTP ¶ func (p *Plugin) ServeHTTP(rw http.ResponseWriter, req *http.Request) ServeHTTP implements http.Handler interface. Source Files ¶ View all Source files plugin.go Click to show internal directories. Click to hide internal directories.