stdhttpware

package
v0.0.148 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2025 License: MIT Imports: 11 Imported by: 0

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