diff --git a/plugin/src/templates/edge/runtime.ts b/plugin/src/templates/edge/runtime.ts index d380e66f54..def301d78a 100644 --- a/plugin/src/templates/edge/runtime.ts +++ b/plugin/src/templates/edge/runtime.ts @@ -47,7 +47,7 @@ const handler = async (req: Request, context: Context) => { }, url: url.toString(), method: req.method, - ip: req.headers.get('x-nf-client-address') ?? undefined, + ip: context.ip, body: req.body ?? undefined, }