Write a handler
A CDN application consists of two parts: a root context that registers the filter factory, and a filter that implements the callbacks. Replacesrc/lib.rs with:
Root registers a new Filter for each incoming request via create_http_context. on_http_request_headers runs when the CDN receives request headers — this example adds a custom x-fastedge header and returns Action::Continue to pass the request downstream unchanged. To stop the request instead, return Action::Pause.
Build
Compile the handler to a WebAssembly binary. The first build downloads dependencies and takes one to two minutes../target/wasm32-wasip1/release/my_cdn_app.wasm. This file is uploaded to FastEdge in the next step.