Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetClientIP ¶ added in v0.3.0
GetClientIP returns the client's IP address from the request.
By default, it trusts proxy headers and reads the client IP from the x-forwarded-for header (or the header named by AIKIDO_CLIENT_IP_HEADER). It returns the first valid non-private IP found in that header, falling back to the TCP remote address if none is found.
Set AIKIDO_TRUST_PROXY=false to disable proxy header trust entirely and always use the raw TCP remote address instead.
func OnPostRequest ¶
OnPostRequest gets called after a response is ready to be sent out.
func TryExtractBody ¶
func TryExtractBody(req *http.Request, parser MultipartFormParser) any
TryExtractBody attempts to extract body data from a request, trying JSON first, then forms
Types ¶
type MultipartFormParser ¶
MultipartFormParser defines the interface for extracting multipart form data