Documentation
¶
Overview ¶
Package header defines constants for HTTP header names and common Content-Type values used across porto (X-Correlation-ID, Authorization, application/json, application/grpc-web+proto, ...). Header names are in canonical MIME form and can be passed directly to http.Header methods, except Authority, the HTTP/2 pseudo-header used in gRPC metadata.
Index ¶
Constants ¶
View Source
const ( // Accept is HTTP header for "Accept" Accept = "Accept" // AcceptEncoding is HTTP header for "Accept-Encoding" AcceptEncoding = "Accept-Encoding" // AccessControlRequestMethod is sent by browsers on a CORS preflight // request; its presence on an OPTIONS request identifies the preflight. AccessControlRequestMethod = "Access-Control-Request-Method" // ApplicationJSON is HTTP header value for "application/json" ApplicationJSON = "application/json" // ApplicationJoseJSON is HTTP header value for "application/jose+json" ApplicationJoseJSON = "application/jose+json" // ApplicationGRPC is HTTP header value for "application/grpc" ApplicationGRPC = "application/grpc" // ApplicationGRPCWebProto is HTTP header value for "application/grpc-web+proto" ApplicationGRPCWebProto = "application/grpc-web+proto" // ApplicationGRPCWebText is HTTP header value for "application/grpc-web-text" ApplicationGRPCWebText = "application/grpc-web-text" // ApplicationTimestampQuery is HTTP header value for RFC3161 Timestamp request ApplicationTimestampQuery = "application/timestamp-query" // ApplicationTimestampReply is HTTP header value for RFC3161 Timestamp response ApplicationTimestampReply = "application/timestamp-reply" // Authorization is HTTP header for "Authorization" Authorization = "Authorization" // Authority is the HTTP/2 pseudo-header exposed in gRPC incoming metadata. Authority = ":authority" // Cookie is HTTP header for browser cookies. Cookie = "Cookie" // ProxyAuthorization is HTTP header for proxy credentials. ProxyAuthorization = "Proxy-Authorization" // Bearer is token type for "Authorization" header Bearer = "Bearer" // DPoP is token type for "Authorization" header, // and header name for DPoP DPoP = "DPoP" // CacheControl is HTTP header for "Cache-Control" CacheControl = "Cache-Control" // ContentDisposition is HTTP header for "Content-Disposition" ContentDisposition = "Content-Disposition" // ContentEncoding is HTTP header for "Content-Encoding" ContentEncoding = "Content-Encoding" // ContentLength is HTTP header for "Content-Length" ContentLength = "Content-Length" // ContentType is HTTP header for "Content-Type" ContentType = "Content-Type" // Gzip content type for "gzip" Gzip = "gzip" // IfMatch is HTTP header for "If-Match" IfMatch = "If-Match" // Link is HTTP header for "Link" Link = "Link" // Location is HTTP header for "Location" Location = "Location" // Origin carries the requesting site on cross-origin browser requests. Origin = "Origin" // ReplayNonce is HTTP header for "Replay-Nonce" ReplayNonce = "Replay-Nonce" // RetryAfter is sent with 429 and 503 responses to tell the client how // long to wait before retrying, as delay-seconds or an HTTP date. RetryAfter = "Retry-After" // TextPlain is HTTP header value for "text/plain" TextPlain = "text/plain" // UserAgent is HTTP header value for "User-Agent" UserAgent = "User-Agent" // Vary lists request headers that select a response representation. Vary = "Vary" // XHostname contains the name of the HTTP header to indicate which host requested the signature XHostname = "X-HostName" // XClientHostname carries the host name of the calling machine, // set by the retriable client's WithUserAgent. XClientHostname = "X-CLIENT-HOSTNAME" // XClientIP carries a local IP address of the calling machine, // set by the retriable client's WithUserAgent. It is informational and // not a trusted client address. XClientIP = "X-CLIENT-IP" // XCorrelationID is HTTP header for "X-Correlation-ID" XCorrelationID = "X-Correlation-ID" // XCSRFToken carries the double-submit CSRF token that must equal the // CSRF cookie when a request is authenticated with the auth cookie. XCSRFToken = "X-CSRF-Token" // XDeviceID is HTTP header for "X-Device-ID" XDeviceID = "X-Device-ID" // XFilename contains the name of the artifact to sign XFilename = "X-Filename" // XForwardedFor carries the proxy chain of client IP addresses. XForwardedFor = "X-Forwarded-For" // XForwardedProto contains the protocol XForwardedProto = "X-Forwarded-Proto" // XRealIP carries the client IP supplied by a reverse proxy. XRealIP = "X-Real-Ip" // XGRPCStream is set by gRPC-Web clients to indicate a streaming call. // When present, the server must not apply HTTP-level gzip compression, // as it would break streaming. XGRPCStream = "X-Grpc-Stream" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.