wsutil

package
v2.0.3+incompatible Latest Latest
Warning

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

Go to latest
Published: May 15, 2018 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package wsutil provides websocket server utilities.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AllowOrigins

func AllowOrigins(origins []string) (func(r *http.Request) bool, error)

AllowOriginsGlob returns a function, sutiable for setting WebsocketServer.Upgrader.CheckOrigin, that returns true if: the origin is not set, is equal to the request host, or matches one of the allowed patterns. A pattern is in the form of a shell glob as described here: https://golang.org/pkg/path/filepath/#Match

Types

This section is empty.

Jump to

Keyboard shortcuts

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