grpc-go-addons: gomodules.xyz/grpc-go-addons/cors Index | Files

package cors

import "gomodules.xyz/grpc-go-addons/cors"

Index

Package Files

gateway.go interceptors.go options.go registry.go

func StreamServerInterceptor Uses

func StreamServerInterceptor(opts ...Option) grpc.StreamServerInterceptor

StreamServerInterceptor returns a new streaming server interceptor for OpenTracing.

func UnaryServerInterceptor Uses

func UnaryServerInterceptor(opts ...Option) grpc.UnaryServerInterceptor

UnaryServerInterceptor returns a new unary server interceptor for OpenTracing.

type Handler Uses

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

https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Origin https://fetch.spec.whatwg.org/#cors-protocol-and-credentials For requests without credentials, the server may specify "*" as a wildcard, thereby allowing any origin to access the resource.

func NewHandler Uses

func NewHandler(r PatternRegistry, opts ...Option) *Handler

func (*Handler) RegisterHandler Uses

func (r *Handler) RegisterHandler(mux *runtime.ServeMux)

func (Handler) ServeHTTP Uses

func (r Handler) ServeHTTP(w http.ResponseWriter, req *http.Request, _ map[string]string)

type Option Uses

type Option func(*options)

func AllowSubdomain Uses

func AllowSubdomain(allow bool) Option

func OriginHost Uses

func OriginHost(host string) Option

type PatternRegistry Uses

type PatternRegistry []runtime.Pattern

https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Origin https://fetch.spec.whatwg.org/#cors-protocol-and-credentials For requests without credentials, the server may specify "*" as a wildcard, thereby allowing any origin to access the resource.

func (*PatternRegistry) Register Uses

func (r *PatternRegistry) Register(f []runtime.Pattern)

Package cors imports 12 packages (graph) and is imported by 3 packages. Updated 2019-07-13. Refresh now. Tools for package owners.