stdhttpware

package
v0.0.235 Latest Latest
Warning

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

Go to latest
Published: May 19, 2026 License: MIT Imports: 12 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package stdhttpware provides cross-cutting middleware http handlers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Apply

func Apply(mux http.Handler, logs *zap.Logger) http.Handler

Apply applies the middleware in the correct order.

func NewConnectCORSMiddleware

func NewConnectCORSMiddleware(maxAgeSeconds int, whiteList ...string) func(http.Handler) http.Handler

NewConnectCORSMiddleware initializes the CORS middleware. In our case CORS is allowed if the origin of the request is on the same root domain as the requests host, i.e: it is a first party request.

func RootDomainOfHost

func RootDomainOfHost(h string) string

RootDomainOfHost returns the "root" part of the host provided.

Types

This section is empty.

Jump to

Keyboard shortcuts

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