{"id":21465184,"url":"https://github.com/desuuuu/traefik-cloudflare-plugin","last_synced_at":"2025-07-15T04:31:41.503Z","repository":{"id":61625554,"uuid":"537771164","full_name":"Desuuuu/traefik-cloudflare-plugin","owner":"Desuuuu","description":"Traefik plugin to handle traffic coming from CloudFlare.","archived":false,"fork":false,"pushed_at":"2023-01-20T22:43:49.000Z","size":150,"stargazers_count":9,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-08T22:03:37.305Z","etag":null,"topics":["cloudflare","traefik","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Desuuuu.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":"2022-09-17T10:18:26.000Z","updated_at":"2025-02-07T22:04:17.000Z","dependencies_parsed_at":"2023-02-12T06:16:09.352Z","dependency_job_id":null,"html_url":"https://github.com/Desuuuu/traefik-cloudflare-plugin","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/Desuuuu/traefik-cloudflare-plugin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Desuuuu%2Ftraefik-cloudflare-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Desuuuu%2Ftraefik-cloudflare-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Desuuuu%2Ftraefik-cloudflare-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Desuuuu%2Ftraefik-cloudflare-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Desuuuu","download_url":"https://codeload.github.com/Desuuuu/traefik-cloudflare-plugin/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Desuuuu%2Ftraefik-cloudflare-plugin/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265402833,"owners_count":23759237,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["cloudflare","traefik","traefik-plugin"],"created_at":"2024-11-23T08:09:29.614Z","updated_at":"2025-07-15T04:31:41.033Z","avatar_url":"https://github.com/Desuuuu.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# traefik-cloudflare-plugin\n\n[![Tag Badge]][Tag] [![Go Version Badge]][Go Version] [![Build Badge]][Build] [![Go Report Card Badge]][Go Report Card]\n\nTraefik plugin to handle traffic coming from Cloudflare.\n\n## Features\n\n* Only allow traffic originating from Cloudflare\n* Rewrite requests `X-Forwarded-For` header with the user IP\n\n## Configuration\n\n### Plugin options\n\n| Key                     | Type            | Default | Description                                                                                                                                     |\n|:-----------------------:|:---------------:|:-------:|:-----------------------------------------------------------------------------------------------------------------------------------------------:|\n| `trustedCIDRs`          | `[]string`      | `[]`    | Requests coming from a source not matching any of these CIDRs will be terminated with a 403. If empty, it is populated with Cloudflare's CIDRs. |\n| `refreshInterval`       | `time.Duration` | `24h`   | When `trustedCIDRs` is empty, Cloudflare's CIDRs will be refreshed after this duration. Using a value of 0 seconds disables the refresh.        |\n| `overwriteForwardedFor` | `bool`          | `true`  | When `true`, the request's `X-Forwarded-For` header is replaced by the content of the `CF-Connecting-IP` header.                                |\n\n### Traefik static configuration\n\n```yaml\nexperimental:\n  plugins:\n    cloudflare:\n      moduleName: github.com/Desuuuu/traefik-cloudflare-plugin\n      version: v1.0.0\n```\n\n### Dynamic configuration\n\n```yaml\nhttp:\n  middlewares:\n    cloudflare:\n      plugin:\n        cloudflare:\n          trustedCIDRs: []\n          overwriteForwardedFor: true\n\n  routers:\n    foo-router:\n      rule: Path(`/foo`)\n      service: foo-service\n      entryPoints:\n        - web\n      middlewares:\n        - cloudflare\n```\n\n[Tag]: https://github.com/Desuuuu/traefik-cloudflare-plugin/tags\n[Tag Badge]: https://img.shields.io/github/v/tag/Desuuuu/traefik-cloudflare-plugin?sort=semver\n[Go Version]: /go.mod\n[Go Version Badge]: https://img.shields.io/github/go-mod/go-version/Desuuuu/traefik-cloudflare-plugin\n[Build]: https://github.com/Desuuuu/traefik-cloudflare-plugin/actions/workflows/test.yml\n[Build Badge]: https://img.shields.io/github/actions/workflow/status/Desuuuu/traefik-cloudflare-plugin/test.yml\n[Go Report Card]: https://goreportcard.com/report/github.com/Desuuuu/traefik-cloudflare-plugin\n[Go Report Card Badge]: https://goreportcard.com/badge/github.com/Desuuuu/traefik-cloudflare-plugin\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdesuuuu%2Ftraefik-cloudflare-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdesuuuu%2Ftraefik-cloudflare-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdesuuuu%2Ftraefik-cloudflare-plugin/lists"}