httphdr

package
v0.13.6 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2023 License: Unlicense Imports: 0 Imported by: 10

Documentation

Overview

Package httphdr contains the names of HTTP headers.

Please keep the values in their canonical form.

Index

Constants

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 (
	IfMatch           = "If-Match"
	IfModifiedSince   = "If-Modified-Since"
	IfNoneMatch       = "If-None-Match"
	IfRange           = "If-Range"
	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"

	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 (
	Authorization = "Authorization"
)

Common standard headers for authentication.

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

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 (
	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