aspnet / BasicMiddleware

[Archived] Basic middleware components for ASP.NET Core. Project moved to https://github.com/aspnet/AspNetCore
Apache License 2.0
169 stars 84 forks source link

Change redirect on HttpsRedirectionOptions from 301 to 302 #271

Closed javiercn closed 6 years ago

javiercn commented 6 years ago

https://github.com/aspnet/BasicMiddleware/blob/dev/src/Microsoft.AspNetCore.HttpsPolicy/HttpsRedirectionOptions.cs#L16

It's painful if a redirection to the wrong url happens (for example due to a misconfiguration caused by the lack of launchSettings.json)

This should be a 302 instead.

Tratcher commented 6 years ago

We'll rely on HSTS for the permanence aspect, that has more configurable caching policies.