cors

package
v1.0.1003 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(listener interfaces.Listener, options Options) interfaces.Interceptor

Types

type Cors

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

func (*Cors) Handler

func (c *Cors) Handler(h http.Handler) http.Handler

func (*Cors) Name

func (c *Cors) Name() string

func (*Cors) StreamServerInterceptor

func (c *Cors) StreamServerInterceptor() grpc.StreamServerInterceptor

func (*Cors) UnaryServerInterceptor

func (c *Cors) UnaryServerInterceptor() grpc.UnaryServerInterceptor

type Options

type Options struct {
	AccessControlAllowHeaders  []string
	AccessControlAllowOrigin   string
	AccessControlAllowMethods  []string
	AccessControlExposeHeaders []string
}

func OptionsDefault

func OptionsDefault() Options

Jump to

Keyboard shortcuts

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