Skip to content
New issue

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

docs: include xForwardedFor param on getRequestIP #906

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

RihanArfan
Copy link

Adds a missing parameter on the docs for getRequestIP(). May be worth backporting to v1 docs too.

h3/src/utils/request.ts

Lines 297 to 307 in 7324eee

export function getRequestIP(
event: H3Event,
opts: {
/**
* Use the X-Forwarded-For HTTP header set by proxies.
*
* Note: Make sure that this header can be trusted (your application running behind a CDN or reverse proxy) before enabling.
*/
xForwardedFor?: boolean;
} = {},
): string | undefined {

@RihanArfan RihanArfan requested a review from pi0 as a code owner October 28, 2024 18:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant