2 implementations of
Microsoft.AspNetCore.Http (1)
HeaderDictionary.cs (1)
67public StringValues this[string key]
Microsoft.AspNetCore.Server.Kestrel.Core (1)
Internal\Http\HttpHeaders.cs (1)
47StringValues IHeaderDictionary.this[string key]
136 writes to
Aspire.Dashboard (3)
DashboardEndpointsBuilder.cs (1)
238httpContext.Response.Headers["X-Accel-Buffering"] = "no";
Model\BrowserSecurityHeadersMiddleware.cs (1)
74context.Response.Headers["Referrer-Policy"] = "strict-origin-when-cross-origin";
Utils\GlobalizationHelpers.cs (1)
134tempHttpContext.Request.Headers["Accept-Language"] = acceptLanguage;
Aspire.Dashboard.Tests (1)
OtlpApiKeyAuthenticationHandlerTests.cs (1)
98httpContext.Request.Headers[OtlpApiKeyAuthenticationHandler.ApiKeyHeaderName] = otlpApiKeyHeader;
Microsoft.AspNetCore.Components.Endpoints (4)
Builder\ResourceCollectionUrlEndpoint.cs (4)
253context.Response.Headers[HeaderNames.ContentEncoding] = "gzip"; 264context.Response.Headers[HeaderNames.CacheControl] = "max-age=31536000, immutable, no-transform"; 269context.Response.Headers[HeaderNames.CacheControl] = "no-cache, must-revalidate, no-transform"; 276context.Response.Headers[HeaderNames.Vary] = HeaderNames.AcceptEncoding;
Microsoft.AspNetCore.Diagnostics.Middleware (2)
Latency\AddServerTimingHeaderMiddleware.cs (1)
44httpContext.Response.Headers[ServerTimingHeaderName] = $"{existing}, reqlatency;dur={elapsedMs}";
Latency\RequestLatencyTelemetryMiddleware.cs (1)
68httpContext.Response.Headers[TelemetryConstants.ServerApplicationNameHeader] = _applicationName;
Microsoft.AspNetCore.HeaderParsing.Tests (9)
HeaderParsingExtensionsTests.cs (1)
110context.Request.Headers["Date"] = date;
HeaderParsingFeatureTests.cs (8)
46Context.Request.Headers["Date"] = date; 64Context.Request.Headers["Date"] = currentDate; 65Context.Request.Headers["Test"] = futureDate; 87Context.Request.Headers["Date"] = date; 136Context.Request.Headers["Date"] = "Not a date."; 175Context.Request.Headers[firstHeaderKey.Name] = DateTimeOffset.Now.ToString("R", CultureInfo.InvariantCulture); 176Context.Request.Headers[thirdHeaderKey.Name] = DateTimeOffset.Now.ToString("R", CultureInfo.InvariantCulture); 193Context.Request.Headers[HeaderNames.CacheControl] = "max-age=604800";
Microsoft.AspNetCore.Http.Abstractions (3)
Internal\ParsingHelpers.cs (3)
60headers[key] = string.Join(',', value.Select(QuoteIfNeeded)); 98headers[key] = values.GetValueOrDefault(); 119headers[key] = existing + "," + string.Join(',', values.Select(QuoteIfNeeded));
Microsoft.AspNetCore.Http.Extensions (4)
HeaderDictionaryTypeExtensions.cs (4)
61headers[name] = value.ToString(); 76headers[name] = new StringValues(values[0]!.ToString()); 85headers[name] = new StringValues(newValues); 127headers[name] = HeaderUtilities.FormatDate(value.GetValueOrDefault());
Microsoft.AspNetCore.Http.Features (89)
IHeaderDictionary.Keyed.cs (89)
11StringValues Accept { get => this[HeaderNames.Accept]; set => this[HeaderNames.Accept] = value; } 14StringValues AcceptCharset { get => this[HeaderNames.AcceptCharset]; set => this[HeaderNames.AcceptCharset] = value; } 17StringValues AcceptEncoding { get => this[HeaderNames.AcceptEncoding]; set => this[HeaderNames.AcceptEncoding] = value; } 20StringValues AcceptLanguage { get => this[HeaderNames.AcceptLanguage]; set => this[HeaderNames.AcceptLanguage] = value; } 23StringValues AcceptRanges { get => this[HeaderNames.AcceptRanges]; set => this[HeaderNames.AcceptRanges] = value; } 26StringValues AccessControlAllowCredentials { get => this[HeaderNames.AccessControlAllowCredentials]; set => this[HeaderNames.AccessControlAllowCredentials] = value; } 29StringValues AccessControlAllowHeaders { get => this[HeaderNames.AccessControlAllowHeaders]; set => this[HeaderNames.AccessControlAllowHeaders] = value; } 32StringValues AccessControlAllowMethods { get => this[HeaderNames.AccessControlAllowMethods]; set => this[HeaderNames.AccessControlAllowMethods] = value; } 35StringValues AccessControlAllowOrigin { get => this[HeaderNames.AccessControlAllowOrigin]; set => this[HeaderNames.AccessControlAllowOrigin] = value; } 38StringValues AccessControlExposeHeaders { get => this[HeaderNames.AccessControlExposeHeaders]; set => this[HeaderNames.AccessControlExposeHeaders] = value; } 41StringValues AccessControlMaxAge { get => this[HeaderNames.AccessControlMaxAge]; set => this[HeaderNames.AccessControlMaxAge] = value; } 44StringValues AccessControlRequestHeaders { get => this[HeaderNames.AccessControlRequestHeaders]; set => this[HeaderNames.AccessControlRequestHeaders] = value; } 47StringValues AccessControlRequestMethod { get => this[HeaderNames.AccessControlRequestMethod]; set => this[HeaderNames.AccessControlRequestMethod] = value; } 50StringValues Age { get => this[HeaderNames.Age]; set => this[HeaderNames.Age] = value; } 53StringValues Allow { get => this[HeaderNames.Allow]; set => this[HeaderNames.Allow] = value; } 56StringValues AltSvc { get => this[HeaderNames.AltSvc]; set => this[HeaderNames.AltSvc] = value; } 59StringValues Authorization { get => this[HeaderNames.Authorization]; set => this[HeaderNames.Authorization] = value; } 62StringValues Baggage { get => this[HeaderNames.Baggage]; set => this[HeaderNames.Baggage] = value; } 65StringValues CacheControl { get => this[HeaderNames.CacheControl]; set => this[HeaderNames.CacheControl] = value; } 68StringValues Connection { get => this[HeaderNames.Connection]; set => this[HeaderNames.Connection] = value; } 71StringValues ContentDisposition { get => this[HeaderNames.ContentDisposition]; set => this[HeaderNames.ContentDisposition] = value; } 74StringValues ContentEncoding { get => this[HeaderNames.ContentEncoding]; set => this[HeaderNames.ContentEncoding] = value; } 77StringValues ContentLanguage { get => this[HeaderNames.ContentLanguage]; set => this[HeaderNames.ContentLanguage] = value; } 80StringValues ContentLocation { get => this[HeaderNames.ContentLocation]; set => this[HeaderNames.ContentLocation] = value; } 83StringValues ContentMD5 { get => this[HeaderNames.ContentMD5]; set => this[HeaderNames.ContentMD5] = value; } 86StringValues ContentRange { get => this[HeaderNames.ContentRange]; set => this[HeaderNames.ContentRange] = value; } 89StringValues ContentSecurityPolicy { get => this[HeaderNames.ContentSecurityPolicy]; set => this[HeaderNames.ContentSecurityPolicy] = value; } 92StringValues ContentSecurityPolicyReportOnly { get => this[HeaderNames.ContentSecurityPolicyReportOnly]; set => this[HeaderNames.ContentSecurityPolicyReportOnly] = value; } 95StringValues ContentType { get => this[HeaderNames.ContentType]; set => this[HeaderNames.ContentType] = value; } 98StringValues CorrelationContext { get => this[HeaderNames.CorrelationContext]; set => this[HeaderNames.CorrelationContext] = value; } 101StringValues Cookie { get => this[HeaderNames.Cookie]; set => this[HeaderNames.Cookie] = value; } 104StringValues Date { get => this[HeaderNames.Date]; set => this[HeaderNames.Date] = value; } 107StringValues ETag { get => this[HeaderNames.ETag]; set => this[HeaderNames.ETag] = value; } 110StringValues Expires { get => this[HeaderNames.Expires]; set => this[HeaderNames.Expires] = value; } 113StringValues Expect { get => this[HeaderNames.Expect]; set => this[HeaderNames.Expect] = value; } 116StringValues From { get => this[HeaderNames.From]; set => this[HeaderNames.From] = value; } 119StringValues GrpcAcceptEncoding { get => this[HeaderNames.GrpcAcceptEncoding]; set => this[HeaderNames.GrpcAcceptEncoding] = value; } 122StringValues GrpcEncoding { get => this[HeaderNames.GrpcEncoding]; set => this[HeaderNames.GrpcEncoding] = value; } 125StringValues GrpcMessage { get => this[HeaderNames.GrpcMessage]; set => this[HeaderNames.GrpcMessage] = value; } 128StringValues GrpcStatus { get => this[HeaderNames.GrpcStatus]; set => this[HeaderNames.GrpcStatus] = value; } 131StringValues GrpcTimeout { get => this[HeaderNames.GrpcTimeout]; set => this[HeaderNames.GrpcTimeout] = value; } 134StringValues Host { get => this[HeaderNames.Host]; set => this[HeaderNames.Host] = value; } 137StringValues KeepAlive { get => this[HeaderNames.KeepAlive]; set => this[HeaderNames.KeepAlive] = value; } 140StringValues IfMatch { get => this[HeaderNames.IfMatch]; set => this[HeaderNames.IfMatch] = value; } 143StringValues IfModifiedSince { get => this[HeaderNames.IfModifiedSince]; set => this[HeaderNames.IfModifiedSince] = value; } 146StringValues IfNoneMatch { get => this[HeaderNames.IfNoneMatch]; set => this[HeaderNames.IfNoneMatch] = value; } 149StringValues IfRange { get => this[HeaderNames.IfRange]; set => this[HeaderNames.IfRange] = value; } 152StringValues IfUnmodifiedSince { get => this[HeaderNames.IfUnmodifiedSince]; set => this[HeaderNames.IfUnmodifiedSince] = value; } 155StringValues LastModified { get => this[HeaderNames.LastModified]; set => this[HeaderNames.LastModified] = value; } 158StringValues Link { get => this[HeaderNames.Link]; set => this[HeaderNames.Link] = value; } 161StringValues Location { get => this[HeaderNames.Location]; set => this[HeaderNames.Location] = value; } 164StringValues MaxForwards { get => this[HeaderNames.MaxForwards]; set => this[HeaderNames.MaxForwards] = value; } 167StringValues Origin { get => this[HeaderNames.Origin]; set => this[HeaderNames.Origin] = value; } 170StringValues Pragma { get => this[HeaderNames.Pragma]; set => this[HeaderNames.Pragma] = value; } 173StringValues ProxyAuthenticate { get => this[HeaderNames.ProxyAuthenticate]; set => this[HeaderNames.ProxyAuthenticate] = value; } 176StringValues ProxyAuthorization { get => this[HeaderNames.ProxyAuthorization]; set => this[HeaderNames.ProxyAuthorization] = value; } 179StringValues ProxyConnection { get => this[HeaderNames.ProxyConnection]; set => this[HeaderNames.ProxyConnection] = value; } 182StringValues Range { get => this[HeaderNames.Range]; set => this[HeaderNames.Range] = value; } 185StringValues Referer { get => this[HeaderNames.Referer]; set => this[HeaderNames.Referer] = value; } 188StringValues RetryAfter { get => this[HeaderNames.RetryAfter]; set => this[HeaderNames.RetryAfter] = value; } 191StringValues RequestId { get => this[HeaderNames.RequestId]; set => this[HeaderNames.RequestId] = value; } 194StringValues SecWebSocketAccept { get => this[HeaderNames.SecWebSocketAccept]; set => this[HeaderNames.SecWebSocketAccept] = value; } 197StringValues SecWebSocketKey { get => this[HeaderNames.SecWebSocketKey]; set => this[HeaderNames.SecWebSocketKey] = value; } 200StringValues SecWebSocketProtocol { get => this[HeaderNames.SecWebSocketProtocol]; set => this[HeaderNames.SecWebSocketProtocol] = value; } 203StringValues SecWebSocketVersion { get => this[HeaderNames.SecWebSocketVersion]; set => this[HeaderNames.SecWebSocketVersion] = value; } 206StringValues SecWebSocketExtensions { get => this[HeaderNames.SecWebSocketExtensions]; set => this[HeaderNames.SecWebSocketExtensions] = value; } 209StringValues Server { get => this[HeaderNames.Server]; set => this[HeaderNames.Server] = value; } 212StringValues SetCookie { get => this[HeaderNames.SetCookie]; set => this[HeaderNames.SetCookie] = value; } 215StringValues StrictTransportSecurity { get => this[HeaderNames.StrictTransportSecurity]; set => this[HeaderNames.StrictTransportSecurity] = value; } 218StringValues TE { get => this[HeaderNames.TE]; set => this[HeaderNames.TE] = value; } 221StringValues Trailer { get => this[HeaderNames.Trailer]; set => this[HeaderNames.Trailer] = value; } 224StringValues TransferEncoding { get => this[HeaderNames.TransferEncoding]; set => this[HeaderNames.TransferEncoding] = value; } 227StringValues Translate { get => this[HeaderNames.Translate]; set => this[HeaderNames.Translate] = value; } 230StringValues TraceParent { get => this[HeaderNames.TraceParent]; set => this[HeaderNames.TraceParent] = value; } 233StringValues TraceState { get => this[HeaderNames.TraceState]; set => this[HeaderNames.TraceState] = value; } 236StringValues Upgrade { get => this[HeaderNames.Upgrade]; set => this[HeaderNames.Upgrade] = value; } 239StringValues UpgradeInsecureRequests { get => this[HeaderNames.UpgradeInsecureRequests]; set => this[HeaderNames.UpgradeInsecureRequests] = value; } 242StringValues UserAgent { get => this[HeaderNames.UserAgent]; set => this[HeaderNames.UserAgent] = value; } 245StringValues Vary { get => this[HeaderNames.Vary]; set => this[HeaderNames.Vary] = value; } 248StringValues Via { get => this[HeaderNames.Via]; set => this[HeaderNames.Via] = value; } 251StringValues Warning { get => this[HeaderNames.Warning]; set => this[HeaderNames.Warning] = value; } 254StringValues WebSocketSubProtocols { get => this[HeaderNames.WebSocketSubProtocols]; set => this[HeaderNames.WebSocketSubProtocols] = value; } 257StringValues WWWAuthenticate { get => this[HeaderNames.WWWAuthenticate]; set => this[HeaderNames.WWWAuthenticate] = value; } 260StringValues XContentTypeOptions { get => this[HeaderNames.XContentTypeOptions]; set => this[HeaderNames.XContentTypeOptions] = value; } 263StringValues XFrameOptions { get => this[HeaderNames.XFrameOptions]; set => this[HeaderNames.XFrameOptions] = value; } 266StringValues XPoweredBy { get => this[HeaderNames.XPoweredBy]; set => this[HeaderNames.XPoweredBy] = value; } 269StringValues XRequestedWith { get => this[HeaderNames.XRequestedWith]; set => this[HeaderNames.XRequestedWith] = value; } 272StringValues XUACompatible { get => this[HeaderNames.XUACompatible]; set => this[HeaderNames.XUACompatible] = value; } 275StringValues XXSSProtection { get => this[HeaderNames.XXSSProtection]; set => this[HeaderNames.XXSSProtection] = value; }
Microsoft.AspNetCore.HttpOverrides (8)
ForwardedHeadersMiddleware.cs (8)
310requestHeaders[_options.OriginalForHeaderName] = new IPEndPoint(connection.RemoteIpAddress, connection.RemotePort).ToString(); 315requestHeaders[_options.ForwardedForHeaderName] = 330requestHeaders[_options.OriginalProtoHeaderName] = request.Scheme; 334requestHeaders[_options.ForwardedProtoHeaderName] = 348requestHeaders[_options.OriginalHostHeaderName] = request.Host.ToString(); 352requestHeaders[_options.ForwardedHostHeaderName] = 368requestHeaders[_options.OriginalPrefixHeaderName] = request.PathBase.ToString(); 374requestHeaders[_options.ForwardedPrefixHeaderName] =
Microsoft.AspNetCore.OutputCaching (2)
OutputCacheEntry.cs (1)
120headers[header.Name] = header.Value;
OutputCacheMiddleware.cs (1)
293context.HttpContext.Response.Headers[key] = values;
Microsoft.AspNetCore.ResponseCaching (3)
ResponseCachingMiddleware.cs (3)
163context.HttpContext.Response.Headers[key] = values; 175response.Headers[header.Key] = header.Value; 353context.CachedResponse.Headers[header.Key] = header.Value;
Microsoft.AspNetCore.Server.Kestrel.Core (1)
Internal\Http3\Http3Stream.cs (1)
1290ResponseHeaders[WebTransportSession.VersionHeaderPrefix] = version;
Microsoft.AspNetCore.Watch.BrowserRefresh (4)
src\sdk\src\Dotnet.Watch\Web.Middleware\BrowserScriptMiddleware.cs (3)
39context.Response.Headers["Cache-Control"] = "no-store"; 40context.Response.Headers["Content-Length"] = _contentLength; 41context.Response.Headers["Content-Type"] = "application/javascript; charset=utf-8";
src\sdk\src\Dotnet.Watch\Web.Middleware\HostingStartup.cs (1)
44context.Response.Headers["Clear-Site-Data"] = "\"cache\"";
Stress.ApiService (2)
Program.cs (2)
871context.Response.Headers["Content-Type"] = "text/plain; charset=utf-8"; 872context.Response.Headers["Cache-Control"] = "no-cache";
WebPubSubWeb (1)
Program.cs (1)
55context.Response.Headers["WebHook-Allowed-Origin"] = "*";
116 references to
Microsoft.AspNetCore.Antiforgery (1)
Internal\DefaultAntiforgeryTokenStore.cs (1)
47requestToken = httpContext.Request.Headers[_options.HeaderName];
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (3)
Latency\AddServerTimingHeaderMiddlewareTests.cs (1)
45var header = context.Response.Headers[AddServerTimingHeaderMiddleware.ServerTimingHeaderName];
Latency\RequestLatencyTelemetryMiddlewareTests.cs (2)
44var header = httpContextMock.Response.Headers[TelemetryConstants.ServerApplicationNameHeader]; 102var header = httpContextMock.Response.Headers[TelemetryConstants.ServerApplicationNameHeader];
Microsoft.AspNetCore.Hosting (1)
Internal\HostingApplicationDiagnostics.cs (1)
426fieldValue = headers[fieldName];
Microsoft.AspNetCore.Http.Abstractions (1)
Extensions\RequestTrailerExtensions.cs (1)
61return feature.Trailers[trailerName];
Microsoft.AspNetCore.Http.Extensions (2)
HeaderDictionaryTypeExtensions.cs (2)
171var headerValue = headers[name]; 224var values = headers[name];
Microsoft.AspNetCore.Http.Features (89)
IHeaderDictionary.Keyed.cs (89)
11StringValues Accept { get => this[HeaderNames.Accept]; set => this[HeaderNames.Accept] = value; } 14StringValues AcceptCharset { get => this[HeaderNames.AcceptCharset]; set => this[HeaderNames.AcceptCharset] = value; } 17StringValues AcceptEncoding { get => this[HeaderNames.AcceptEncoding]; set => this[HeaderNames.AcceptEncoding] = value; } 20StringValues AcceptLanguage { get => this[HeaderNames.AcceptLanguage]; set => this[HeaderNames.AcceptLanguage] = value; } 23StringValues AcceptRanges { get => this[HeaderNames.AcceptRanges]; set => this[HeaderNames.AcceptRanges] = value; } 26StringValues AccessControlAllowCredentials { get => this[HeaderNames.AccessControlAllowCredentials]; set => this[HeaderNames.AccessControlAllowCredentials] = value; } 29StringValues AccessControlAllowHeaders { get => this[HeaderNames.AccessControlAllowHeaders]; set => this[HeaderNames.AccessControlAllowHeaders] = value; } 32StringValues AccessControlAllowMethods { get => this[HeaderNames.AccessControlAllowMethods]; set => this[HeaderNames.AccessControlAllowMethods] = value; } 35StringValues AccessControlAllowOrigin { get => this[HeaderNames.AccessControlAllowOrigin]; set => this[HeaderNames.AccessControlAllowOrigin] = value; } 38StringValues AccessControlExposeHeaders { get => this[HeaderNames.AccessControlExposeHeaders]; set => this[HeaderNames.AccessControlExposeHeaders] = value; } 41StringValues AccessControlMaxAge { get => this[HeaderNames.AccessControlMaxAge]; set => this[HeaderNames.AccessControlMaxAge] = value; } 44StringValues AccessControlRequestHeaders { get => this[HeaderNames.AccessControlRequestHeaders]; set => this[HeaderNames.AccessControlRequestHeaders] = value; } 47StringValues AccessControlRequestMethod { get => this[HeaderNames.AccessControlRequestMethod]; set => this[HeaderNames.AccessControlRequestMethod] = value; } 50StringValues Age { get => this[HeaderNames.Age]; set => this[HeaderNames.Age] = value; } 53StringValues Allow { get => this[HeaderNames.Allow]; set => this[HeaderNames.Allow] = value; } 56StringValues AltSvc { get => this[HeaderNames.AltSvc]; set => this[HeaderNames.AltSvc] = value; } 59StringValues Authorization { get => this[HeaderNames.Authorization]; set => this[HeaderNames.Authorization] = value; } 62StringValues Baggage { get => this[HeaderNames.Baggage]; set => this[HeaderNames.Baggage] = value; } 65StringValues CacheControl { get => this[HeaderNames.CacheControl]; set => this[HeaderNames.CacheControl] = value; } 68StringValues Connection { get => this[HeaderNames.Connection]; set => this[HeaderNames.Connection] = value; } 71StringValues ContentDisposition { get => this[HeaderNames.ContentDisposition]; set => this[HeaderNames.ContentDisposition] = value; } 74StringValues ContentEncoding { get => this[HeaderNames.ContentEncoding]; set => this[HeaderNames.ContentEncoding] = value; } 77StringValues ContentLanguage { get => this[HeaderNames.ContentLanguage]; set => this[HeaderNames.ContentLanguage] = value; } 80StringValues ContentLocation { get => this[HeaderNames.ContentLocation]; set => this[HeaderNames.ContentLocation] = value; } 83StringValues ContentMD5 { get => this[HeaderNames.ContentMD5]; set => this[HeaderNames.ContentMD5] = value; } 86StringValues ContentRange { get => this[HeaderNames.ContentRange]; set => this[HeaderNames.ContentRange] = value; } 89StringValues ContentSecurityPolicy { get => this[HeaderNames.ContentSecurityPolicy]; set => this[HeaderNames.ContentSecurityPolicy] = value; } 92StringValues ContentSecurityPolicyReportOnly { get => this[HeaderNames.ContentSecurityPolicyReportOnly]; set => this[HeaderNames.ContentSecurityPolicyReportOnly] = value; } 95StringValues ContentType { get => this[HeaderNames.ContentType]; set => this[HeaderNames.ContentType] = value; } 98StringValues CorrelationContext { get => this[HeaderNames.CorrelationContext]; set => this[HeaderNames.CorrelationContext] = value; } 101StringValues Cookie { get => this[HeaderNames.Cookie]; set => this[HeaderNames.Cookie] = value; } 104StringValues Date { get => this[HeaderNames.Date]; set => this[HeaderNames.Date] = value; } 107StringValues ETag { get => this[HeaderNames.ETag]; set => this[HeaderNames.ETag] = value; } 110StringValues Expires { get => this[HeaderNames.Expires]; set => this[HeaderNames.Expires] = value; } 113StringValues Expect { get => this[HeaderNames.Expect]; set => this[HeaderNames.Expect] = value; } 116StringValues From { get => this[HeaderNames.From]; set => this[HeaderNames.From] = value; } 119StringValues GrpcAcceptEncoding { get => this[HeaderNames.GrpcAcceptEncoding]; set => this[HeaderNames.GrpcAcceptEncoding] = value; } 122StringValues GrpcEncoding { get => this[HeaderNames.GrpcEncoding]; set => this[HeaderNames.GrpcEncoding] = value; } 125StringValues GrpcMessage { get => this[HeaderNames.GrpcMessage]; set => this[HeaderNames.GrpcMessage] = value; } 128StringValues GrpcStatus { get => this[HeaderNames.GrpcStatus]; set => this[HeaderNames.GrpcStatus] = value; } 131StringValues GrpcTimeout { get => this[HeaderNames.GrpcTimeout]; set => this[HeaderNames.GrpcTimeout] = value; } 134StringValues Host { get => this[HeaderNames.Host]; set => this[HeaderNames.Host] = value; } 137StringValues KeepAlive { get => this[HeaderNames.KeepAlive]; set => this[HeaderNames.KeepAlive] = value; } 140StringValues IfMatch { get => this[HeaderNames.IfMatch]; set => this[HeaderNames.IfMatch] = value; } 143StringValues IfModifiedSince { get => this[HeaderNames.IfModifiedSince]; set => this[HeaderNames.IfModifiedSince] = value; } 146StringValues IfNoneMatch { get => this[HeaderNames.IfNoneMatch]; set => this[HeaderNames.IfNoneMatch] = value; } 149StringValues IfRange { get => this[HeaderNames.IfRange]; set => this[HeaderNames.IfRange] = value; } 152StringValues IfUnmodifiedSince { get => this[HeaderNames.IfUnmodifiedSince]; set => this[HeaderNames.IfUnmodifiedSince] = value; } 155StringValues LastModified { get => this[HeaderNames.LastModified]; set => this[HeaderNames.LastModified] = value; } 158StringValues Link { get => this[HeaderNames.Link]; set => this[HeaderNames.Link] = value; } 161StringValues Location { get => this[HeaderNames.Location]; set => this[HeaderNames.Location] = value; } 164StringValues MaxForwards { get => this[HeaderNames.MaxForwards]; set => this[HeaderNames.MaxForwards] = value; } 167StringValues Origin { get => this[HeaderNames.Origin]; set => this[HeaderNames.Origin] = value; } 170StringValues Pragma { get => this[HeaderNames.Pragma]; set => this[HeaderNames.Pragma] = value; } 173StringValues ProxyAuthenticate { get => this[HeaderNames.ProxyAuthenticate]; set => this[HeaderNames.ProxyAuthenticate] = value; } 176StringValues ProxyAuthorization { get => this[HeaderNames.ProxyAuthorization]; set => this[HeaderNames.ProxyAuthorization] = value; } 179StringValues ProxyConnection { get => this[HeaderNames.ProxyConnection]; set => this[HeaderNames.ProxyConnection] = value; } 182StringValues Range { get => this[HeaderNames.Range]; set => this[HeaderNames.Range] = value; } 185StringValues Referer { get => this[HeaderNames.Referer]; set => this[HeaderNames.Referer] = value; } 188StringValues RetryAfter { get => this[HeaderNames.RetryAfter]; set => this[HeaderNames.RetryAfter] = value; } 191StringValues RequestId { get => this[HeaderNames.RequestId]; set => this[HeaderNames.RequestId] = value; } 194StringValues SecWebSocketAccept { get => this[HeaderNames.SecWebSocketAccept]; set => this[HeaderNames.SecWebSocketAccept] = value; } 197StringValues SecWebSocketKey { get => this[HeaderNames.SecWebSocketKey]; set => this[HeaderNames.SecWebSocketKey] = value; } 200StringValues SecWebSocketProtocol { get => this[HeaderNames.SecWebSocketProtocol]; set => this[HeaderNames.SecWebSocketProtocol] = value; } 203StringValues SecWebSocketVersion { get => this[HeaderNames.SecWebSocketVersion]; set => this[HeaderNames.SecWebSocketVersion] = value; } 206StringValues SecWebSocketExtensions { get => this[HeaderNames.SecWebSocketExtensions]; set => this[HeaderNames.SecWebSocketExtensions] = value; } 209StringValues Server { get => this[HeaderNames.Server]; set => this[HeaderNames.Server] = value; } 212StringValues SetCookie { get => this[HeaderNames.SetCookie]; set => this[HeaderNames.SetCookie] = value; } 215StringValues StrictTransportSecurity { get => this[HeaderNames.StrictTransportSecurity]; set => this[HeaderNames.StrictTransportSecurity] = value; } 218StringValues TE { get => this[HeaderNames.TE]; set => this[HeaderNames.TE] = value; } 221StringValues Trailer { get => this[HeaderNames.Trailer]; set => this[HeaderNames.Trailer] = value; } 224StringValues TransferEncoding { get => this[HeaderNames.TransferEncoding]; set => this[HeaderNames.TransferEncoding] = value; } 227StringValues Translate { get => this[HeaderNames.Translate]; set => this[HeaderNames.Translate] = value; } 230StringValues TraceParent { get => this[HeaderNames.TraceParent]; set => this[HeaderNames.TraceParent] = value; } 233StringValues TraceState { get => this[HeaderNames.TraceState]; set => this[HeaderNames.TraceState] = value; } 236StringValues Upgrade { get => this[HeaderNames.Upgrade]; set => this[HeaderNames.Upgrade] = value; } 239StringValues UpgradeInsecureRequests { get => this[HeaderNames.UpgradeInsecureRequests]; set => this[HeaderNames.UpgradeInsecureRequests] = value; } 242StringValues UserAgent { get => this[HeaderNames.UserAgent]; set => this[HeaderNames.UserAgent] = value; } 245StringValues Vary { get => this[HeaderNames.Vary]; set => this[HeaderNames.Vary] = value; } 248StringValues Via { get => this[HeaderNames.Via]; set => this[HeaderNames.Via] = value; } 251StringValues Warning { get => this[HeaderNames.Warning]; set => this[HeaderNames.Warning] = value; } 254StringValues WebSocketSubProtocols { get => this[HeaderNames.WebSocketSubProtocols]; set => this[HeaderNames.WebSocketSubProtocols] = value; } 257StringValues WWWAuthenticate { get => this[HeaderNames.WWWAuthenticate]; set => this[HeaderNames.WWWAuthenticate] = value; } 260StringValues XContentTypeOptions { get => this[HeaderNames.XContentTypeOptions]; set => this[HeaderNames.XContentTypeOptions] = value; } 263StringValues XFrameOptions { get => this[HeaderNames.XFrameOptions]; set => this[HeaderNames.XFrameOptions] = value; } 266StringValues XPoweredBy { get => this[HeaderNames.XPoweredBy]; set => this[HeaderNames.XPoweredBy] = value; } 269StringValues XRequestedWith { get => this[HeaderNames.XRequestedWith]; set => this[HeaderNames.XRequestedWith] = value; } 272StringValues XUACompatible { get => this[HeaderNames.XUACompatible]; set => this[HeaderNames.XUACompatible] = value; } 275StringValues XXSSProtection { get => this[HeaderNames.XXSSProtection]; set => this[HeaderNames.XXSSProtection] = value; }
Microsoft.AspNetCore.HttpOverrides (2)
CertificateForwardingMiddleware.cs (1)
49var header = httpContext.Request.Headers[_options.CertificateHeader];
HttpMethodOverrideMiddleware.cs (1)
49var xHttpMethodOverrideValue = context.Request.Headers[xHttpMethodOverride];
Microsoft.AspNetCore.Mvc.Core (2)
ModelBinding\Binders\HeaderModelBinder.cs (2)
130var value = request.Headers[headerName]; 157request.Headers[headerName]);
Microsoft.AspNetCore.Mvc.Cors (2)
CorsAuthorizationFilter.cs (1)
90httpContext.Request.Headers[CorsConstants.AccessControlRequestMethod];
DisableCorsAuthorizationFilter.cs (1)
27context.HttpContext.Request.Headers[CorsConstants.AccessControlRequestMethod];
Microsoft.AspNetCore.Mvc.TagHelpers (1)
Cache\CacheTagKey.cs (1)
22private static readonly Func<IHeaderDictionary, string, string> HeaderAccessor = (c, key) => c[key];
Microsoft.AspNetCore.OutputCaching (1)
OutputCacheKeyProvider.cs (1)
164var headerValues = requestHeaders[header];
Microsoft.AspNetCore.ResponseCaching (1)
ResponseCachingKeyProvider.cs (1)
114var headerValues = requestHeaders[header];
Microsoft.AspNetCore.Rewrite (1)
PatternSegments\HeaderSegment.cs (1)
17return context.HttpContext.Request.Headers[_header];
Microsoft.AspNetCore.Routing (2)
Matching\ContentEncodingNegotiationMatcherPolicy.cs (1)
17private protected override StringValues GetNegotiationHeader(HttpContext httpContext) => httpContext.Request.Headers[HeaderName];
Matching\NegotiationMatcherPolicy.cs (1)
431var header = httpContext.Request.Headers[_negotiationHeader];
Microsoft.AspNetCore.Server.IISIntegration (4)
IISMiddleware.cs (4)
103if (!string.Equals(_pairingToken, httpContext.Request.Headers[MSAspNetCoreToken], StringComparison.Ordinal)) 113string.Equals(ANCMShutdownEventHeaderValue, httpContext.Request.Headers[MSAspNetCoreEvent], StringComparison.OrdinalIgnoreCase)) 137var header = httpContext.Request.Headers[MSAspNetCoreClientCert]; 172var tokenHeader = context.Request.Headers[MSAspNetCoreWinAuthToken];
Microsoft.AspNetCore.Server.Kestrel.Core (1)
Internal\Http\Http1MessageBody.cs (1)
190_ = headerDictionary.TryAdd("X-Content-Length", headerDictionary[HeaderNames.ContentLength]);
Microsoft.DotNet.HotReload.Watch (1)
src\sdk\src\Dotnet.Watch\AspireService\Helpers\HttpContextExtensions.cs (1)
32var dcpHeader = context.Request.Headers[DCPInstanceIDHeader];
WebPubSubWeb (1)
Program.cs (1)
68var userId = context.Request.Headers["ce-userId"];