crossorigin

package
v0.3.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2026 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Anonymous Send cross-origin requests without credentials (cookies, auth headers excluded). Safe for
	// public CDN resources and enables canvas pixel access for CORS-enabled images.
	Anonymous = CrossOrigin("anonymous")

	// UseCredentials Send cross-origin requests with credentials included. Server must explicitly allow with
	// Access-Control-Allow-Credentials: true header for this to work properly.
	UseCredentials = CrossOrigin("use-credentials")
)

Variables for CrossOrigin values

Functions

This section is empty.

Types

type CrossOrigin

type CrossOrigin []byte

CrossOrigin Cross-Origin Resource Sharing (CORS) configuration for external resources. Controls whether credentials are sent with cross-origin requests and enables secure resource sharing.

func Custom

func Custom(value string) CrossOrigin

Custom allows setting a custom CrossOrigin value for edge cases or future specifications. Use this when the predefined constants don't cover your specific use case.

Jump to

Keyboard shortcuts

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