referrer

package
v5.10.8 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2023 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var QueryParams = []struct {
	param        string
	preferHeader bool
}{
	{"ref", false},
	{"referer", false},
	{"referrer", false},
	{"source", true},
	{"utm_source", true},
}

QueryParams is a list of query parameters to set the referrer.

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