Changes Https Redirect default from 301 to 302 (#272)
This commit is contained in:
parent
759148da4c
commit
727efaec49
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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());
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue