outboundstate

package
v0.10.1 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2026 License: MIT Imports: 3 Imported by: 0 modules, 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 outboundstate shares request observation state between transport instrumentation and contract security policies without exposing public APIs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RefuseRedirect

func RefuseRedirect(request *http.Request)

RefuseRedirect marks the response that triggered CheckRedirect. The state is on Response.Request because http.Client.Timeout wraps response bodies with a private type and redirects inherit the original (unwrapped) request context.

func WithContext

func WithContext(ctx context.Context, state *State) context.Context

Types

type State

type State struct{ RedirectRefused atomic.Bool }

State belongs to one HTTP request, including its redirect decision.

func FromContext

func FromContext(ctx context.Context) *State

Jump to

Keyboard shortcuts

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