MCPcopy
hub / github.com/gofiber/fiber / Hostname

Method Hostname

req_interface_gen.go:96–96  ·  view source on GitHub ↗

Hostname contains the hostname derived from the X-Forwarded-Host or Host HTTP header using the c.Host() method. Returned value is only valid within the handler. Do not store any references. Example: URL: https://example.com:8080 -> Hostname: example.com Make copies or use the Immutable setting inste

()

Source from the content-addressed store, hash-verified

94 // Make copies or use the Immutable setting instead.
95 // Please use Config.TrustProxy to prevent header spoofing if your app is behind a proxy.
96 Hostname() string
97 // Port returns the remote port of the request.
98 Port() string
99 // IP returns the client's IP address. When the request comes from a trusted proxy (see

Callers 15

testGracefulShutdownFunction · 0.65
wrapHandlersMethod · 0.65
Test_Ctx_HostnameFunction · 0.65
Benchmark_Ctx_HostnameFunction · 0.65
Test_Client_Invalid_URLFunction · 0.65
Test_GetFunction · 0.65
Test_HeadFunction · 0.65

Implementers 1

Calls

no outgoing calls

Tested by 15

testGracefulShutdownFunction · 0.52
Test_Ctx_HostnameFunction · 0.52
Benchmark_Ctx_HostnameFunction · 0.52
Test_Client_Invalid_URLFunction · 0.52
Test_GetFunction · 0.52
Test_HeadFunction · 0.52
Test_Request_GetFunction · 0.52