Create a reverse proxy with Cloudflare Workers

Published under Devops.

This is my first pass at a reverse proxy script using Cloudflare Workers. It's pretty simple.

This worker does the following:

  1. Takes the query parameters from the request

  2. Adds a token parameter pulled from an environment variable, OHSEESNAPS_TOKEN

  3. Sends a request to the proxied server,

  4. When sending the request to the proxied server, the original query parameters (including the added token parameter) are sent as well

  5. The response from the proxied server is sent back to the client

Thanks for reading!

Did you find this post useful? Let me know on Twitter! If you found an issue with the content, submit a pull request!

Subscribe to my newsletter to know when I publish more content in the future.

❤️ Likes: 0
📣 Retweets: 0
💬 Replies: 0
🙊 Mentions: 0