redirecthttps

package module
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2017 License: MIT Imports: 3 Imported by: 0

README

redirecthttps

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(config Config) middleware.Middleware

New creates new redirect https middleware

Types

type Config

type Config struct {
	Skipper middleware.Skipper
	Mode    Mode
}

Config is redirect https middleware config

type Mode

type Mode int

Mode is the redirect https mode

const (
	// OnlyConnectionState check only connection state from r.TLS
	OnlyConnectionState Mode = iota

	// OnlyProxy check only X-Forwarded-Proto in request header
	OnlyProxy

	// All check both X-Forwarded-Proto and Request
	All
)

Jump to

Keyboard shortcuts

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