fetchmetadata

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package fetchmetadata reads the Fetch Metadata request headers (Sec-Fetch-*) browsers send. Its functions are safe for concurrent use.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RefuseCrossSite

func RefuseCrossSite(request *http.Request) error

RefuseCrossSite refuses a request the browser marks Sec-Fetch-Site: cross-site (a link, form or redirect from another site) with *auth.Error ErrForbidden; same-origin, same-site, user-initiated (none) and requests without the header (older browsers, non-browser clients) pass with nil.

Types

This section is empty.

Jump to

Keyboard shortcuts

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