docs

package
v3.65.0 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClientFieldSpec added in v3.63.0

func ClientFieldSpec(forOutput bool, extraChildren ...docs.FieldSpec) docs.FieldSpec

ClientFieldSpec returns a field spec for an http client component.

func ServerCORSFieldSpec added in v3.63.0

func ServerCORSFieldSpec() docs.FieldSpec

ServerCORSFieldSpec returns a field spec for an http server CORS component.

Types

type ServerCORS added in v3.63.0

type ServerCORS struct {
	Enabled        bool     `json:"enabled" yaml:"enabled"`
	AllowedOrigins []string `json:"allowed_origins" yaml:"allowed_origins"`
}

ServerCORS contains configuration for allowing CORS headers.

func NewServerCORS added in v3.63.0

func NewServerCORS() ServerCORS

NewServerCORS returns a new server CORS config with default fields.

func (ServerCORS) WrapHandler added in v3.63.0

func (conf ServerCORS) WrapHandler(handler http.Handler) (http.Handler, error)

WrapHandler wraps a provided HTTP handler with middleware that enables CORS requests (when configured).

Jump to

Keyboard shortcuts

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