We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Bun 1.2.0 H3 1.13.0
import { createApp, getRequestIP, toWebHandler } from "h3"; export default { fetch: toWebHandler(createApp().use((ev) => typeof getRequestIP(ev))), };
when using node adapter (in bun or deno), this bug doesn't happen and the ip exists:
import { createApp, getRequestIP, toNodeListener } from "h3"; import { createServer } from "http"; createServer( toNodeListener(createApp().use((ev) => typeof getRequestIP(ev))) ).listen(3000);
same bug in deno and wrangler dev (cloudflare)
wrangler dev
The text was updated successfully, but these errors were encountered:
Cloudflare pages use the header x-real-ip. So, to be sure to get the ip, i did this :
x-real-ip
const ip = getRequestIP(event) || getRequestHeader(event, 'x-real-ip')
But getRequestIP should return the IP for any platforms...
getRequestIP
Sorry, something went wrong.
No branches or pull requests
Environment
Bun 1.2.0
H3 1.13.0
Reproduction
Describe the bug
when using node adapter (in bun or deno), this bug doesn't happen and the ip exists:
Additional context
same bug in deno and
wrangler dev
(cloudflare)Logs
The text was updated successfully, but these errors were encountered: