rexCors

package
v1.0.23 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CustomMiddlewareFn

func CustomMiddlewareFn(allowMethodsInput []string, allowHeadersInput []string, exposeHeadersInput []string, maxAgeHeaderVal int64) func(header http.Header)

func CustomNotAllowedFn

func CustomNotAllowedFn() func(http.ResponseWriter)

Types

type Cors

type Cors struct {
	AllowedOrigins  []string `json:",default=[http://localhost:8888]"`
	AllowMethods    []string `json:",default=[GET,POST]"`
	AllowHeaders    []string `json:",default=[Content-Type,Origin,X-CSRF-Token,Authorization,X-Request-ID,Host,X-Amz-Content-Sha256,X-Amz-Date,Range]"`
	ExposeHeaders   []string `json:",default=[Content-Length,Access-Control-Allow-Origin,Access-Control-Allow-Headers]"`
	MaxAgeHeaderVal int64    `json:",default=86400"`
}

Jump to

Keyboard shortcuts

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