cors

package
v0.0.0-...-17853a9 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CORSServer

type CORSServer struct {
	// contains filtered or unexported fields
}

func WrapHandler

func WrapHandler(h http.Handler, opts Options) *CORSServer

func (*CORSServer) HandlePreflight

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

func (*CORSServer) ServeHTTP

func (cs *CORSServer) ServeHTTP(w http.ResponseWriter, r *http.Request)

func (*CORSServer) WriteControlHeaders

func (cs *CORSServer) WriteControlHeaders(w http.ResponseWriter, r *http.Request)

type Options

type Options struct {
	Origin string
}

Jump to

Keyboard shortcuts

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