Skip to content
This repository was archived by the owner on Jul 6, 2025. It is now read-only.

Commit ab717f8

Browse files
committed
fix(server): Use remoteAddr to get hostname
1 parent ef0fdeb commit ab717f8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

server/api.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export class Request implements APIRequest {
4444
}
4545

4646
get hostname(): string {
47-
return this.#req.headers.get("X-Forwarded-Host") || this.#req.headers.get("Host") || "0.0.0.0"
47+
return (this.#req.conn.remoteAddr as Deno.NetAddr).hostname;
4848
}
4949

5050
get headers(): Headers {

0 commit comments

Comments
 (0)