httphdr

package
v0.35.21 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2026 License: Unlicense Imports: 0 Imported by: 18 modules, 18 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 httphdr contains the names of HTTP headers.

Please keep the values in their canonical form.

TODO(a.garipov): Tests for that.

Index

Constants

View Source
const (
	Authorization   = "Authorization"
	WWWAuthenticate = "Www-Authenticate"
)

Common standard headers for authentication.

See https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers#authentication.

View Source
const (
	CacheControl = "Cache-Control"
	Expires      = "Expires"
	Pragma       = "Pragma"
)

Common standard headers for caching.

See https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers#caching.

View Source
const (
	Cookie    = "Cookie"
	SetCookie = "Set-Cookie"
)

Common standard headers for cookie management.

See https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers#cookies.

View Source
const (
	ETag              = "ETag"
	IfMatch           = "If-Match"
	IfModifiedSince   = "If-Modified-Since"
	IfNoneMatch       = "If-None-Match"
	IfUnmodifiedSince = "If-Unmodified-Since"
	LastModified      = "Last-Modified"
	Vary              = "Vary"
)

Common standard headers for conditionals.

See https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers#conditionals.

View Source
const (
	Accept         = "Accept"
	AcceptEncoding = "Accept-Encoding"
	AcceptLanguage = "Accept-Language"
)

Common standard headers for content negotiation.

See https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers#content_negotiation.

View Source
const (
	AccessControlAllowOrigin = "Access-Control-Allow-Origin"
	Origin                   = "Origin"
)

Common standard headers for CORS.

See https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers#cors.

View Source
const (
	ContentEncoding = "Content-Encoding"
	ContentLength   = "Content-Length"
	ContentType     = "Content-Type"
)

Common standard headers for message body information.

See https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers#message_body_information.

View Source
const (
	Host      = "Host"
	Referer   = "Referer"
	UserAgent = "User-Agent"
)

Common standard headers for request contexts.

See https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers#request_context.

View Source
const (
	ContentSecurityPolicy           = "Content-Security-Policy"
	ContentSecurityPolicyReportOnly = "Content-Security-Policy-Report-Only"
	StrictTransportSecurity         = "Strict-Transport-Security"
)

Common standard headers for security.

See https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers#security.

View Source
const (
	TransferEncoding = "Transfer-Encoding"
	Trailer          = "Trailer"
)

Common standard headers for transfer coding.

See https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers#transfer_coding.

View Source
const (
	AltSvc     = "Alt-Svc"
	Date       = "Date"
	RetryAfter = "Retry-After"
)

Miscellaneous common standard headers.

See https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers#other.

View Source
const (
	AdminToken   = "Admin-Token"
	TrueClientIP = "True-Client-Ip"

	XClientID           = "X-Clientid"
	XConnectingIP       = "X-Connecting-Ip"
	XContentTypeOptions = "X-Content-Type-Options"
	XError              = "X-Error"
	XForwardedFor       = "X-Forwarded-For"
	XForwardedHost      = "X-Forwarded-Host"
	XForwardedProto     = "X-Forwarded-Proto"
	XProjectName        = "X-Project-Name"
	XProxyTarget        = "X-Proxy-Target"
	XRealIP             = "X-Real-Ip"
	XRequestID          = "X-Request-Id"
	XRequestedWith      = "X-Requested-With"
)

Common extension headers.

View Source
const (
	CFConnectingIP = "Cf-Connecting-Ip"
	CFIPCountry    = "Cf-Ipcountry"
)

Common Cloudflare extension headers.

View Source
const (
	ContentDisposition = "Content-Disposition"
)

Common standard headers for controlling downloads.

See https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers#downloads.

View Source
const (
	DNT = "Dnt"
)

Common deprecated headers.

View Source
const (
	Forwarded = "Forwarded"
)

Common standard headers for proxies.

See https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers#proxies.

View Source
const (
	IfRange = "If-Range"
)

Common standard headers for range requests.

See https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers#range_requests.

View Source
const (
	Location = "Location"
)

Common standard headers for redirects.

See https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers#redirects

View Source
const (
	SecFetchDest = "Sec-Fetch-Dest"
)

Common standard headers for fetch metadata.

See https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers#fetch_metadata_request_headers.

View Source
const (
	SecGPC = "Sec-Gpc"
)

Common standard headers for client hints.

See https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers#client_hints.

View Source
const (
	Server = "Server"
)

Common standard headers for response contexts.

See https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers#response_context.

Variables

This section is empty.

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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