middleware

package
v0.0.0-...-0daaea0 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2022 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CORS

CORS middleware allows us to make requests to the seperate javascript client

func CheckAuthentication

func CheckAuthentication(h fasthttp.RequestHandler) fasthttp.RequestHandler

CheckAuthentication looks for a cookie, given by the /register or /login routes. And finds the username in that jwt token.

func CheckToken

func CheckToken(next httprouter.Handle) httprouter.Handle

CheckAuthentication looks for a cookie, given by the /register or /login routes. And finds the username in that jwt token.

func FullLogger

FullLogger prints out most of the provided information to stdout FORMAT time [remote-addr] [http-version] [method] [url] [status] [response-time] [user-agent]

func SecureHeaders

func SecureHeaders(next httprouter.Handle) httprouter.Handle

SecureHeaders adds some common headers for some security things.

func SetHTTPLogging

func SetHTTPLogging(condition bool)

SetHTTPLogging sets the variable in this file to a given condition

func TinyHTTPLogger

func TinyHTTPLogger(req httprouter.Handle) httprouter.Handle

TinyLogger prints a few pieces of information to stdout when a request happens. FORMAT: [method] [url] [status] [response-time]

func TinyLogger

TinyLogger prints a few pieces of information to stdout when a request happens. FORMAT: [method] [url] [status] [response-time]

Types

This section is empty.

Jump to

Keyboard shortcuts

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