cors

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CORS

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

CORS implements the ICORS interface and provides the CORS middleware handler.

func (*CORS) Handler

func (c *CORS) Handler() mux.MiddlewareFunc

Handler returns the CORS middleware function.

type CORSFactory

type CORSFactory struct{}

CORSFactory implements the ICORSFactory interface to create CORS middleware.

func (*CORSFactory) NewCORS

func (c *CORSFactory) NewCORS(config subrouter_config.CORSConfig) ICORS

NewCORS creates a new CORS middleware based on the provided configuration.

type ICORS

type ICORS interface {
	Handler() mux.MiddlewareFunc
}

ICORS interface defines the method to get the CORS middleware handler.

type ICORSFactory

type ICORSFactory interface {
	NewCORS(config subrouter_config.CORSConfig) ICORS
}

Factory interface for creating CORS middleware for subrouters.

func NewCORSFactory

func NewCORSFactory() ICORSFactory

NewCORS creates a new CORS middleware based on the provided configuration.

Jump to

Keyboard shortcuts

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