internal

package
v1.15.2 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultXRealIP added in v1.14.0

func DefaultXRealIP(defaultIP string, next http.Handler) http.Handler

DefaultXRealIP sets the X-Real-Ip header to the given value if and only if it is not an empty string.

func InitSlog

func InitSlog(level string)

func SHA256sum added in v1.15.0

func SHA256sum(text string) string

func UnchangingCache

func UnchangingCache(next http.Handler) http.Handler

UnchangingCache sets the Cache-Control header to cache a response for 1 year if and only if the application is compiled in "release" mode by Docker.

func XForwardedForToXRealIP added in v1.14.1

func XForwardedForToXRealIP(next http.Handler) http.Handler

XForwardedForToXRealIP sets the X-Real-Ip header based on the contents of the X-Forwarded-For header.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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