We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
getRequestEvent()?.nativeEvent.web?.request.cf?.country
is undefined in wrangler pages dev dist because this isn't the original h3 web request which includes cf properties
undefined
wrangler pages dev dist
if you run this in cloudflare, you'll get a string:
import { createApp, toWebHandler } from "h3"; export default { fetch: toWebHandler( createApp().use("/", (e) => { return new Response(e.web?.request?.cf?.country); }) ), };
see above
workaround is getRequestEvent()?.nativeEvent.context
getRequestEvent()?.nativeEvent.context
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Uh oh!
There was an error while loading. Please reload this page.
Duplicates
Latest version
Current behavior 😯
is
undefined
inwrangler pages dev dist
because this isn't the original h3 web request which includes cf propertiesExpected behavior 🤔
if you run this in cloudflare, you'll get a string:
Steps to reproduce 🕹
see above
Context 🔦
workaround is
getRequestEvent()?.nativeEvent.context
Your environment 🌎
The text was updated successfully, but these errors were encountered: