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 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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