Skip to content

Commit

Permalink
[docs] update reference to getClientAddress() (#7907)
Browse files Browse the repository at this point in the history
  • Loading branch information
aradalvand committed Dec 2, 2022
1 parent f953c9d commit f4fe14b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/few-bugs-retire.md
@@ -0,0 +1,5 @@
---
"@sveltejs/adapter-node": patch
---

[docs] update reference to `getClientAddress()`
2 changes: 1 addition & 1 deletion packages/adapter-node/README.md
Expand Up @@ -49,7 +49,7 @@ If `adapter-node` can't correctly determine the URL of your deployment, you may
### `ADDRESS_HEADER` and `XFF_DEPTH`

The [RequestEvent](https://kit.svelte.dev/docs/types#public-types-requestevent) object passed to hooks and endpoints includes an `event.clientAddress` property representing the client's IP address. By default this is the connecting `remoteAddress`. If your server is behind one or more proxies (such as a load balancer), this value will contain the innermost proxy's IP address rather than the client's, so we need to specify an `ADDRESS_HEADER` to read the address from:
The [RequestEvent](https://kit.svelte.dev/docs/types#public-types-requestevent) object passed to hooks and endpoints includes an `event.getClientAddress()` function that returns the client's IP address. By default this is the connecting `remoteAddress`. If your server is behind one or more proxies (such as a load balancer), this value will contain the innermost proxy's IP address rather than the client's, so we need to specify an `ADDRESS_HEADER` to read the address from:

```
ADDRESS_HEADER=True-Client-IP node build
Expand Down

0 comments on commit f4fe14b

Please sign in to comment.