bmw

command module
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2024 License: GPL-3.0 Imports: 8 Imported by: 0

README

BunRouter Middleware (BMW)

This library provides a set of useful middlewares for the BunRouter package in Go.

Installation

To install the library, run the following command:

go get github.com/atridadl/bmw

Usage

Here's an example of how to use the middlewares in this library:

package main

import (
    bmw "github.com/atridadl/bmw"
    "github.com/uptrace/bunrouter"
)

func main() {
    router := bunrouter.New()
    router.Use(bmw.RateLimit())
    router.Use(bmw.RequestID())
    router.Use(bmw.Secure())
    // ...
}

Middlewares

RateLimit

The RateLimit middleware helps to limit the rate of incoming requests.

RequestID

The RequestID middleware assigns a unique ID to each incoming request.

Secure

The Secure middleware adds security-related headers to responses.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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