http

package
v0.0.0-...-c5966c3 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2025 License: Apache-2.0 Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// RequestIDHeaderName represents x-request-id key response header
	RequestIDHeaderName = "x-request-id"
)

Exported values to allow easy customization of HTTP response headers in the future

Functions

func RequestIDMiddleware

func RequestIDMiddleware() lit.HandlerFunc

RequestIDMiddleware ensures each request has a unique Request ID. If the Request ID is provided in the request header, it uses that; otherwise, it generates a new one and injects it into the request context.

Types

This section is empty.

Jump to

Keyboard shortcuts

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