cors

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package cors provides a simple cors middleware.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(cs ...*Control) func(*ws.Context) error

New creates a cors middleware.

Types

type Control

type Control struct {
	Origin           string
	ExposeHeaders    []string
	AllowHeaders     []string
	AllowMethods     []string
	AllowCredentials bool
	MaxAge           int
}

Control represents a access control.

Jump to

Keyboard shortcuts

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