Skip to content

Commit

Permalink
Add in x-is-iis-fallback header to tell us if we have fallen back to IIS
Browse files Browse the repository at this point in the history
  • Loading branch information
sihoran committed Oct 25, 2024
1 parent 41b3175 commit 656e799
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -558,6 +558,13 @@ private async Task<EndpointResponse> GetFriendlyErrorResponse(

private static void EnsureResponseHeadersAndStatusCode(RouteInfo routeInfo, EndpointResponse response)
{

response.Headers[Constants.Headers.IsIisFallback] = new List<string>
{
routeInfo.IsIisFallback.ToString().ToLower()
};


if (!routeInfo.IsIisFallback)
{
if (routeInfo is { ProxyId: not null, BlockVersionInfo: null })
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ public static class Headers
public const string IisHostname = "x-iis-hostname";
public const string OrigHost = "x-orig-host";

public const string IsIisFallback = "x-is-iis-fallback";

public static readonly string[] ConfigHeaders =
{
BlockConfig,
Expand Down

0 comments on commit 656e799

Please sign in to comment.