diff --git a/src/index.js b/src/index.js index fb9007ac0..82d318f8f 100644 --- a/src/index.js +++ b/src/index.js @@ -521,7 +521,11 @@ function honoWrapper(compiler, options) { /** * @returns {string | undefined} */ - req.getURL = () => c.req.url; + req.getURL = () => { + // @ts-ignore + const url = c.get("c.req.url"); + return url || c.req.url; + }; let { status } = c.res;