util

package
v0.0.0-20240822150619 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	XForwardedProto = "X-Forwarded-Proto"
	XForwardedHost  = "X-Forwarded-Host"
	XForwardedURI   = "X-Forwarded-Uri"
)

Variables

This section is empty.

Functions

func GetRequestHost

func GetRequestHost(req *http.Request) string

GetRequestHost returns the request host header or X-Forwarded-Host if present and the request is proxied.

func GetRequestProto

func GetRequestProto(req *http.Request) string

GetRequestProto returns the request scheme or X-Forwarded-Proto if present and the request is proxied.

func GetRequestURI

func GetRequestURI(req *http.Request) string

GetRequestURI return the request URI or X-Forwarded-Uri if present and the request is proxied.

func IsForwardedRequest

func IsForwardedRequest(req *http.Request) bool

func IsProxied

func IsProxied(req *http.Request) bool

IsProxied determines if a request was from a proxy based on the RequestScope ReverseProxy tracker.

Types

This section is empty.

Jump to

Keyboard shortcuts

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