Help us shape the future of Go! Take the 2026 Go Developer Survey

urlsec

package
v0.28.0 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package urlsec holds the URL-scheme security primitives shared by the API transport guard (which refuses to put a bearer token on a cleartext wire) and the OAuth login flow (which validates server-controlled discovery endpoints before handing them to the OS URL-opener or sending a token to them).

Index

Constants

View Source
const EnvAllowHTTP = "HADRON_ALLOW_HTTP"

EnvAllowHTTP opts out of HTTPS enforcement for a trusted local or self-hosted backend reached over plain http. It is deliberately scoped to cleartext http only — it must never green-light a non-HTTP scheme.

Variables

This section is empty.

Functions

func IsLoopbackHost

func IsLoopbackHost(host string) bool

IsLoopbackHost reports whether host is a loopback name or IP. Per RFC 6761, `localhost` and any `*.localhost` name resolve to loopback; a trailing dot (root-zone form) and case are normalized away.

Types

This section is empty.

Jump to

Keyboard shortcuts

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