Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/samuelcolvin/cloudflare-proxy
proxy requests using cloudflare worker, useful for webhooks fired to slow endpoints
https://github.com/samuelcolvin/cloudflare-proxy
Last synced: about 2 months ago
JSON representation
proxy requests using cloudflare worker, useful for webhooks fired to slow endpoints
- Host: GitHub
- URL: https://github.com/samuelcolvin/cloudflare-proxy
- Owner: samuelcolvin
- License: mit
- Created: 2020-01-03T16:48:26.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-04-01T18:10:43.000Z (over 4 years ago)
- Last Synced: 2024-06-21T01:54:19.251Z (3 months ago)
- Language: JavaScript
- Homepage: https://proxy.samuelcolvin.workers.dev/
- Size: 11.7 KB
- Stars: 19
- Watchers: 3
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# cloudflare worker proxy
Proxy requests using a cloudflare worker, useful for webhooks fired to slow endpoints.
[`https://proxy.samuelcolvin.workers.dev`](https://proxy.samuelcolvin.workers.dev) will proxy a request to the URL
specified by the `upstream` GET parameter.Request `method`, `headers` and `body` will be forwarded unchanged if possible.
The function will return immediately, but the proxied request will continue for as long as possible,
this is useful when you want to fire a webhook to an endpoint which may take a long time to startup and respond.
For example a free-tier heroku dyno or google cloud function endpoint which is likely to be cold.## Usage
Make a request with the `upstream` GET parameter providing the upstream url (using httpie):
```bash
curl -v 'https://proxy.samuelcolvin.workers.dev?upstream=https://www.example.com'
```## To publish
```bash
wrangler publish
```