Documentation
¶
Overview ¶
Copyright (c) 2021 rookie-ninja
Use of this source code is governed by an Apache-style license that can be found in the LICENSE file.
Package rkgrpccors is a CORS interceptor for grpc framework
Index ¶
- func Interceptor(h http.Handler, opts ...Option) http.Handler
- type Option
- func WithAllowCredentials(allow bool) Option
- func WithAllowHeaders(headers ...string) Option
- func WithAllowMethods(methods ...string) Option
- func WithAllowOrigins(origins ...string) Option
- func WithEntryNameAndType(entryName, entryType string) Option
- func WithExposeHeaders(headers ...string) Option
- func WithMaxAge(age int) Option
- func WithSkipper(skip Skipper) Option
- type Skipper
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Option ¶
type Option func(*optionSet)
Option if for middleware options while creating middleware
func WithAllowCredentials ¶
WithAllowCredentials allow credentials or not
func WithAllowHeaders ¶
WithAllowHeaders provide allowed headers
func WithAllowMethods ¶
WithAllowMethods provide allowed http methods
func WithAllowOrigins ¶
WithAllowOrigins provide allowed origins.
func WithEntryNameAndType ¶
WithEntryNameAndType provide entry name and entry type.
func WithExposeHeaders ¶
WithExposeHeaders provide expose headers
Click to show internal directories.
Click to hide internal directories.