middleware

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AccessLogger

func AccessLogger(r *http.Request, status, size int, dur time.Duration)

AccessLogger logs information about incoming HTTP requests.

func AdminUser

func AdminUser(h http.HandlerFunc) http.HandlerFunc

AdminUser requires the user to have administration privileges to access content.

func AuthenticatedUser

func AuthenticatedUser(h http.HandlerFunc) http.HandlerFunc

AuthenticatedUser requires the user to be authenticated.

func StaticCacheControl

func StaticCacheControl(h http.Handler) http.HandlerFunc

StaticCacheControl sets the Cache-Control header for static assets.

Types

This section is empty.

Jump to

Keyboard shortcuts

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