Changes Https Redirect default from 301 to 302 (#272)

This commit is contained in:
Justin Kotalik 2017-11-17 09:51:54 -08:00 committed by GitHub
parent 759148da4c
commit 727efaec49
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -13,7 +13,7 @@ namespace Microsoft.AspNetCore.HttpsPolicy
/// <summary>
/// The status code to redirect the response to.
/// </summary>
public int RedirectStatusCode { get; set; } = StatusCodes.Status301MovedPermanently;
public int RedirectStatusCode { get; set; } = StatusCodes.Status302Found;
/// <summary>
/// The TLS port to be added to the redirected URL.

View File

@ -41,7 +41,7 @@ namespace Microsoft.AspNetCore.HttpsPolicy.Tests
var response = await client.SendAsync(request);
Assert.Equal(HttpStatusCode.MovedPermanently, response.StatusCode);
Assert.Equal(HttpStatusCode.Found, response.StatusCode);
Assert.Equal("https://localhost/", response.Headers.Location.ToString());
}