{"id":37150428,"url":"https://github.com/agence-gaya/traefik-plugin-blockuseragent","last_synced_at":"2026-01-14T17:45:41.699Z","repository":{"id":57575809,"uuid":"356093431","full_name":"agence-gaya/traefik-plugin-blockuseragent","owner":"agence-gaya","description":"Block User-Agent","archived":false,"fork":false,"pushed_at":"2024-06-21T23:27:37.000Z","size":15,"stargazers_count":6,"open_issues_count":0,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-06-23T13:40:52.273Z","etag":null,"topics":["traefik-plugin"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/agence-gaya.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-04-09T01:10:34.000Z","updated_at":"2024-06-21T23:27:40.000Z","dependencies_parsed_at":"2022-09-26T19:02:28.701Z","dependency_job_id":null,"html_url":"https://github.com/agence-gaya/traefik-plugin-blockuseragent","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/agence-gaya/traefik-plugin-blockuseragent","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agence-gaya%2Ftraefik-plugin-blockuseragent","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agence-gaya%2Ftraefik-plugin-blockuseragent/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agence-gaya%2Ftraefik-plugin-blockuseragent/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agence-gaya%2Ftraefik-plugin-blockuseragent/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/agence-gaya","download_url":"https://codeload.github.com/agence-gaya/traefik-plugin-blockuseragent/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agence-gaya%2Ftraefik-plugin-blockuseragent/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28428933,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T16:38:47.836Z","status":"ssl_error","status_checked_at":"2026-01-14T16:34:59.695Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["traefik-plugin"],"created_at":"2026-01-14T17:45:41.058Z","updated_at":"2026-01-14T17:45:41.693Z","avatar_url":"https://github.com/agence-gaya.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Block User-Agent\n\n[![Build Status](https://github.com/agence-gaya/traefik-plugin-blockuseragent/workflows/Main/badge.svg?branch=master)](https://github.com/agence-gaya/traefik-plugin-blockuseragent/actions)\n\nBlock User-Agent is a middleware plugin for [Traefik](https://github.com/traefik/traefik) which sends an HTTP `403 Forbidden` \nresponse when the requested HTTP User-Agent header matches one the configured [regular expressions](https://github.com/google/re2/wiki/Syntax).\n\n## Configuration\n\n## StaticUpdate \n\n```toml\n[pilot]\n    token=\"xxx\"\n\n[experimental.plugins.blockuseragent]\n    modulename = \"github.com/agence-gaya/traefik-plugin-blockuseragent\"\n    version = \"vX.Y.Z\"\n```\n\n## Dynamic\n\nTo configure the `Block User-Agent` plugin you should create a [middleware](https://docs.traefik.io/middlewares/overview/) in \nyour dynamic configuration as explained [here](https://docs.traefik.io/middlewares/overview/). The following example creates\nand uses the `blockuseragent` middleware plugin to block all HTTP requests with a User-Agent like `\\bTheAgent\\b`.\nYou can use regexAllow to make exception on blocking regex.\n\n```toml\n[http.routers]\n  [http.routers.my-router]\n    rule = \"Host(`localhost`)\"\n    middlewares = [\"block-foo\"]\n    service = \"my-service\"\n\n# Block all user agent containing TheAgent except if containing Allowed word\n[http.middlewares]\n  [http.middlewares.block-foo.plugin.blockuseragent]\n    regexAllow = [\"\\bAllowed\\b\"]    \n    regex = [\"\\bTheAgent\\b\"]\n\n[http.services]\n  [http.services.my-service]\n    [http.services.my-service.loadBalancer]\n      [[http.services.my-service.loadBalancer.servers]]\n        url = \"http://127.0.0.1\"\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagence-gaya%2Ftraefik-plugin-blockuseragent","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fagence-gaya%2Ftraefik-plugin-blockuseragent","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagence-gaya%2Ftraefik-plugin-blockuseragent/lists"}