https://github.com/milgradesec/doh-cache-worker
A Cloudflare Worker to make DNS over HTTPS requests cacheable at edge.
https://github.com/milgradesec/doh-cache-worker
cloudflare-workers dns-over-https serverless
Last synced: 2 months ago
JSON representation
A Cloudflare Worker to make DNS over HTTPS requests cacheable at edge.
- Host: GitHub
- URL: https://github.com/milgradesec/doh-cache-worker
- Owner: milgradesec
- License: mit
- Created: 2021-10-26T10:31:35.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2025-09-08T02:52:09.000Z (7 months ago)
- Last Synced: 2025-09-08T04:26:46.203Z (7 months ago)
- Topics: cloudflare-workers, dns-over-https, serverless
- Language: TypeScript
- Homepage:
- Size: 73.2 KB
- Stars: 19
- Watchers: 1
- Forks: 9
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ⚡ doh-cache ⚡
👷 `doh-cache` is a Cloudflare Worker to make DNS over HTTPS requests cacheable at edge.
🚀 Running in production at ****
## How it Works
`doh-cache` accepts DNS-over-HTTPS (DoH) **POST** request, rewrites them as equivalent **GET** requests, and then uses Cloudflare’s **Cache API** to store the results at the edge.
On a cache hit, responses are served from the nearest Cloudflare data center, dramatically reducing latency. On a miss, the worker fetches from the upstream DoH resolver, caches the response, and returns it to the client.
## License
MIT License