package redirect

import "github.com/streadway/handy/redirect"

Package redirect contains filters to handle HTTP and HTTPS redirects

Index

Functions

func HTTPS

func HTTPS(next http.Handler) http.Handler

HTTPS ensures the scheme of incoming requests is https:// either from the http.Request.URL.Scheme or X-Forwarded-Proto header. When the scheme is not https, a redirect with 302 will be made to the same host found in http.Request.Host.

Source Files

https.go

Version
v0.0.0-20200128134331-0f66f006fb2e (latest)
Published
Jan 28, 2020
Platform
linux/amd64
Imports
1 packages
Last checked
2 months ago

Tools for package owners.