cors

package
v0.2.19 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2025 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyCORSHeaders

func ApplyCORSHeaders(w http.ResponseWriter, allowedMethods string)

ApplyCORSHeaders adds the standard CORS headers to a response For handlers that are not wrapped in middleware

func HandlePreflight

func HandlePreflight(w http.ResponseWriter, r *http.Request) bool

HandlePreflight checks if the request is a preflight OPTIONS request and handles it Returns true if the request was handled (caller should return immediately)

Types

This section is empty.

Jump to

Keyboard shortcuts

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