-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
clientAddress returns invalid IP #5348
Comments
The reproduction is lacking enough info for us to reproduce this. What adapter are you using, where are you hosting your application, what load balancers / proxies are in front of your app? |
As noted, this is not a proper reproduction, and you don't say what versions of anything you're using. If you're using the Node adapter, you need to use /~https://github.com/sveltejs/kit/tree/master/packages/adapter-node#address_header-and-xff_depth to tell SvelteKit where it should read the client address from - otherwise you'll get the client address of whatever proxy is sitting in front of the server. |
Using the node adaptor, sitting on Google cloud run. The docs don’t really make it clear tbh and why is my express service getting the correct IP with no extra fuss? Why do we have multiple adapters? Surely these other services just run node 🤓 makes it very confusing for people learning the platform. |
You still haven't provided a reproduction, so we have no idea what configuration you're using with The configuration is required to keep your users safe: https://adam-p.ca/blog/2022/03/x-forwarded-for/
Lambda runs on Node, but you're not running a server, you're providing a function. It's a completely different interface. Other platforms (Cloudflare Workers, Deno, etc) are very much not Node. |
Closing as there's no repro and no indication that things aren't working as expected — feel free to open a new issue with a repro if that's not the case |
Describe the bug
We deploy both express and svelte kit to the same servers to test.
Sveltekit post endpoints are returning the same IP address for all users "169.254.1.1" which is a router login IP..
Express returns the correct IP.
We need the IP to filter specific countries (legally) and stop spam.
Reproduction
Logs
No response
System Info
Severity
blocking all usage of SvelteKit
Additional Information
No response
The text was updated successfully, but these errors were encountered: