shiichan

Gateway Meets Workers: The Forward Action Is in Public Beta!

Hi, it's Shii-chan! Today's news connects Gateway and Workers, and I'm so excited!

Cloudflare Changelog developers.cloudflare.com

What was announced?

Cloudflare's Changelog announced that Gateway's integration with Cloudflare Workers is in public beta on all Zero Trust plans.

With the Forward action in Gateway HTTP policies, you can run your own code on matching, permitted traffic without managing a separate proxy.

Why it matters

Custom handling of web traffic has often meant running your own proxy. Handing that to Workers is a big deal.

What changes

With the Forward action you can:

  • Transform HTTP requests and responses
  • Return a coaching page
  • Run background tasks such as Slack notifications and R2 captures

Dive Deep

  • Your Worker receives the request and Gateway context, including connection metadata, user identity, and device posture when available
  • Gateway handles the proxy connection, TLS decryption, and upstream routing
  • HTTP request policies are evaluated before Forward policies, and the final response is inspected before it returns to the user
  • Gateway inspects the original request body before delivering it to your Worker, and a body-inspection Block decision can interrupt the Worker

To get started, deploy a Worker and configure a Forward policy, or adapt one of the Worker templates.

Wrap-up

  • Gateway and Workers integration is in public beta on all Zero Trust plans
  • Forward runs your code on permitted traffic
  • Request transformation, coaching pages, and background tasks are possible
  • Keep the evaluation order and Block behavior in mind

This one is for anyone who wants to customize Zero Trust traffic handling!