mirror of
https://github.com/kataras/iris.git
synced 2025-12-22 04:17:03 +00:00
minor: try to extract from both referer and referrer header and url query parameter
Former-commit-id: c0ed0916f35ee9cffe0b267e34d5708c1d38082b
This commit is contained in:
@@ -8,8 +8,8 @@ func main() {
|
||||
app := iris.New()
|
||||
|
||||
app.Get("/", func(ctx iris.Context) {
|
||||
// GetReferrer extracts and returns the information from the "Referrer" header as specified
|
||||
// in https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referrer-Policy or by the URL query parameter "referrer".
|
||||
// GetReferrer extracts and returns the information from the "Referer" (or "Referrer") header
|
||||
// and url query parameter as specified in https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referrer-Policy.
|
||||
r := ctx.GetReferrer()
|
||||
switch r.Type {
|
||||
case iris.ReferrerSearch:
|
||||
|
||||
Reference in New Issue
Block a user