handler

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AllowHeadersKey = "Access-Control-Allow-Headers"
	AllowedHeaders  = "Accept, Content-Type, Content-Length, Accept-Encoding, Authorization, ResponseType"
	AllowOriginKey  = "Access-Control-Allow-Origin"
	AllowMethodsKey = "Access-Control-Allow-Methods"
	AllowedMethods  = "GET, POST"
)

Variables

This section is empty.

Functions

func CORS

func CORS(handler http.Handler) http.HandlerFunc

CORS allows for Cross-Origin Request Sharing for all domains (*) for all routes on a handler. See https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS for more details.

func GRPC

func GRPC(grpcServer *grpc.Server, otherHandler http.Handler) http.Handler

GRPC handler allows for incoming connections to be handled by either GRPC service or RESTful GRPC-Gateway.

Types

This section is empty.

Jump to

Keyboard shortcuts

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