handlers

package
v0.0.0-...-285c3ee Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2023 License: BSD-2-Clause Imports: 11 Imported by: 0

Documentation

Overview

Accesslog

https://github.com/unrolled/secure/blob/v1/secure.go

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AccessLog

func AccessLog(h http.Handler) http.Handler

func BasicAuth

func BasicAuth(h http.Handler, realm string, userpass map[string]string, authlist map[string]bool) http.Handler

func CORS

func CORS(next http.Handler) http.Handler

func SecureWrapper

func SecureWrapper(h http.Handler) http.Handler

func SetLog

func SetLog(w io.Writer)

func Vhost

func Vhost() http.HandlerFunc

Types

type Msg

type Msg struct {
	Method    string
	Host      string
	URL       string
	Status    int
	Remote    string
	Ratelimit string
	Duration  int64
	UA        string
	Proto     string
	Len       uint64
	Date      string
	Time      string
	Referer   string
}

type MsgPool

type MsgPool struct {
	// contains filtered or unexported fields
}

func (*MsgPool) Get

func (m *MsgPool) Get() *Msg

func (*MsgPool) Put

func (m *MsgPool) Put(b *Msg)

Put puts the bufio.Reader back into the pool.

type RedirectHandler

type RedirectHandler struct {
}

func (*RedirectHandler) ServeHTTP

func (rh *RedirectHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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