http

package
v0.5.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 14, 2025 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoggerWithRequest

func LoggerWithRequest(req *http.Request, logger *slog.Logger) *slog.Logger

LoggerWithRequest assigns informative headers and request details to 'logger'

func ReadUserIP

func ReadUserIP(req *http.Request) string

ReadUserIP returns the value of the 'X-Real-Ip' or 'X-Forwarded-For' headers if present and, if not, returns the default "RemoteAddr" value.

Types

This section is empty.

Directories

Path Synopsis
Package api provides methods for creating API-related HTTP handlers
Package api provides methods for creating API-related HTTP handlers

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL