httpx

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package httpx centralizes the CLI's outbound HTTP security policy.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func APIBaseURL

func APIBaseURL(site string) string

APIBaseURL adds Normatik's fixed API context path to a canonical site URL.

func CanonicalSiteURL

func CanonicalSiteURL(raw string) string

CanonicalSiteURL normalizes the user-facing environment URL. A legacy trailing /api context path is stripped because transports own that prefix.

func NewClient

func NewClient(timeout time.Duration) *http.Client

NewClient creates an HTTP client that follows redirects only within the exact original origin (scheme, hostname and effective port).

func ValidateBaseURL

func ValidateBaseURL(raw string) error

ValidateBaseURL allows HTTPS everywhere and plaintext HTTP only for literal loopback targets when the development opt-in is exactly "1".

Types

This section is empty.

Jump to

Keyboard shortcuts

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