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.
Click to show internal directories.
Click to hide internal directories.