referrer

package
v6.19.1 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2024 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// QueryParams is a list of query parameters to set the referrer.
	QueryParams = []struct {
		param        string
		preferHeader bool
	}{
		{"ref", false},
		{"referer", false},
		{"referrer", false},
		{"source", true},
		{"utm_source", true},
	}
)

Functions

func Get

func Get(r *http.Request, ref, requestHostname string) (string, string, string)

Get returns the referrer for given request.

func Ignore

func Ignore(r *http.Request) bool

Ignore returns whether a referrer should be ignored or not.

Types

This section is empty.

Jump to

Keyboard shortcuts

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