host

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2018 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package host 提供了限定访问域名的中间件。

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(next http.Handler, domains ...string) http.Handler

New 声明一个限定域名的中间件.

若请求的域名不允许,会返回 404 错误。 若 domains 为空,则任何请求都将返回 404。

仅会将域名与 domains 进行比较,端口与协议都将不参写比较。

Types

This section is empty.

Jump to

Keyboard shortcuts

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