middleware

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

▲ PLEASE DONT CHANGE THIS CODE THIS IS A DEFAULT APP CODE, CHANGEING THIS CODE CAN BROKE YOUR SITE.

▲ PLEASE DONT CHANGE THIS CODE THIS IS A DEFAULT APP CODE, CHANGEING THIS CODE CAN BROKE YOUR SITE.

▲ PLEASE DONT CHANGE THIS CODE THIS IS A DEFAULT APP CODE, CHANGEING THIS CODE CAN BROKE YOUR SITE.

▲ PLEASE DONT CHANGE THIS CODE THIS IS A DEFAULT APP CODE, CHANGEING THIS CODE CAN BROKE YOUR SITE.

▲ PLEASE DONT CHANGE THIS CODE THIS IS A DEFAULT APP CODE, CHANGEING THIS CODE CAN BROKE YOUR SITE.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CORS

func CORS(application *fastic.App) func(fasthttp.RequestHandler) fasthttp.RequestHandler

func Recovery

just a midlleware maded for recover panics and deffence server from panic's and crash.

func RequestLogger

func RequestLogger(next fasthttp.RequestHandler) fasthttp.RequestHandler

request logger, is a middleware maded for log request method/path and response speed. =D

func SecurityHeaders

func SecurityHeaders(application *fastic.App) func(next fasthttp.RequestHandler) fasthttp.RequestHandler

some security response headers, you can edit the values on .env file =D

Types

type Limiter

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

limiter struct model, for clean code and easy use i used struct

func NewLimiter

func NewLimiter(r rate.Limit, b int) *Limiter

this function creates new rate limiter for use

func (*Limiter) Limiter

Limiter middleware, maded for limit requests per second, anti ddos and anti dos. <3

Jump to

Keyboard shortcuts

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