{"id":14957691,"url":"https://github.com/kriasoft/cloudflare-ips","last_synced_at":"2025-05-02T08:30:35.995Z","repository":{"id":57200748,"uuid":"102947732","full_name":"kriasoft/cloudflare-ips","owner":"kriasoft","description":"The list of CloudFlare IPs (IP ranges) to be used in the \"trust proxy\" (behind proxy) configurations","archived":false,"fork":false,"pushed_at":"2017-09-09T16:42:23.000Z","size":39,"stargazers_count":8,"open_issues_count":1,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-29T05:27:04.653Z","etag":null,"topics":["cloudflare","express","express-js","expressjs","javascript","koa","koajs","node","node-js","nodejs","proxy","proxy-list"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/kriasoft.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-09-09T10:37:47.000Z","updated_at":"2020-08-18T03:13:06.000Z","dependencies_parsed_at":"2022-09-16T15:10:51.628Z","dependency_job_id":null,"html_url":"https://github.com/kriasoft/cloudflare-ips","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kriasoft%2Fcloudflare-ips","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kriasoft%2Fcloudflare-ips/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kriasoft%2Fcloudflare-ips/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kriasoft%2Fcloudflare-ips/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kriasoft","download_url":"https://codeload.github.com/kriasoft/cloudflare-ips/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252008690,"owners_count":21679623,"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","express","express-js","expressjs","javascript","koa","koajs","node","node-js","nodejs","proxy","proxy-list"],"created_at":"2024-09-24T13:15:21.096Z","updated_at":"2025-05-02T08:30:35.689Z","avatar_url":"https://github.com/kriasoft.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CloudFlare IP Ranges\n\n[![build status](https://img.shields.io/travis/kriasoft/cloudflare-ips/master.svg?style=flat-square)](https://travis-ci.org/kriasoft/cloudflare-ips)\n[![npm version](https://img.shields.io/npm/v/cloudflare-ips.svg?style=flat-square)](https://www.npmjs.com/package/cloudflare-ips)\n[![npm downloads](https://img.shields.io/npm/dm/cloudflare-ips.svg?style=flat-square)](https://www.npmjs.com/package/cloudflare-ips)\n\nThe list of **[CloudFlare][cloudflare]** IPs (IP ranges) to be used in the *[trust proxy][proxy]*\nconfigurations.\n\n\n## How to Use\n\n```bash\n$ npm install cloudflare-ips    # or, `yarn add cloudflare-ips`\n```\n\n```js\nconst express = require('express');\nconst cloudflareIPs = require('cloudflare-ips');\n\nconst app = express();\n\ncloudflareIPs(\n  ips =\u003e app.set('trust proxy', ['loopback', ...ips]),\n  err =\u003e console.error(err.stack),\n);\n\ncloudflareIPs((err, ips) =\u003e {\n  app.set('trust proxy', ['loopback', ...ips]);\n});\n\napp.listen(8080);\n```\n\n## API\n\n#### `cloudFlareIPs(onUpdate, onError, options)`\n\n* `onUpdate`: `(ips: string[]) =\u003e void` — a callback function accepting the list of IPs\n* `onError`: `(err: Error) =\u003e void` — a callback that is triggered on error (optional)\n* `options`: `{ inteval: number }` — allows to tweak the default settings (optional)\n\n\n## Related Projects\n\n* [Node.js API Starter Kit][nsk] — Boilerplate and tooling for building data APIs with Docker,\n  Node.js and GraphQL\n\n\n## License\n\nCopyright © 2017-present [Kriasoft][kriasoft]. This source code is licensed under the MIT license\nfound in the [LICENSE.txt][license] file.\n\n---\nMade with ♥ by Konstantin Tarkus ([@koistya](https://twitter.com/koistya), [blog](https://medium.com/@tarkus))\n\n[cloudflare]: https://www.cloudflare.com/\n[proxy]: https://expressjs.com/en/guide/behind-proxies.html\n[nsk]: https://github.com/kriasoft/nodejs-api-starter\n[kriasoft]: https://www.kriasoft.com/\n[license]: https://github.com/kriasoft/cloudflare-ips/blob/master/LICENSE.txt\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkriasoft%2Fcloudflare-ips","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkriasoft%2Fcloudflare-ips","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkriasoft%2Fcloudflare-ips/lists"}