domain

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package domain provides utilities to inject and retrieve the original request domain in and from the context.

Index

Constants

View Source
const DomainKey contextKey = "domain"

Variables

This section is empty.

Functions

func DomainFromContext

func DomainFromContext(ctx context.Context) (string, error)

DomainFromContext is a helper function that retrieves the domain from the context.

func DomainMiddleware

func DomainMiddleware(next http.Handler) http.Handler

DomainMiddleware is an http.Handler middleware that injects the domain of the original *http.Request into the context for later handlers to access.

Types

This section is empty.

Jump to

Keyboard shortcuts

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