keving11mo ago

remoteAddr returning localhost on Deno Deploy

I saw this thread ( about getting the IP of the requester, but I'm not getting the value I expected. I tried using ctx.remoteAddr with Fresh on Deno Deploy and I get { transport: "tcp", hostname: "localhost", port: 1234 } instead of an IP address – is there something I need to configure to get "real" values?
4 Replies
ioB11mo ago
@marvinh. any ideas? I feel like I remember there being an open issue about this.
keving11mo ago
@lino-levan @marvinh. It looks like this is the open issue:
[Bug Report] Can't get client's Real IP / remoteAddr after upgradin...
Hi, after I updated fresh to v1.3.0 and after. I cannot get the client's real IP by ctx.remoteAddr method. This is the test code of _middleware.ts interface State { ip: string; } export async f...
marvinh.11mo ago
apologies, I haven't had time yet to look at that
keving11mo ago
No worries, just glad it's on the radar