1
0
Fork 0
mirror of https://github.com/Sonarr/Sonarr synced 2024-12-22 07:43:01 +00:00

New: Use 307 redirect for requests missing URL Base

Closes #7262
This commit is contained in:
Mark McDowall 2024-10-04 19:19:12 -07:00 committed by Mark McDowall
parent 354ed96572
commit 39074b0b1d

View file

@ -20,6 +20,8 @@ namespace Sonarr.Http.Middleware
if (_urlBase.IsNotNullOrWhiteSpace() && context.Request.PathBase.Value.IsNullOrWhiteSpace())
{
context.Response.Redirect($"{_urlBase}{context.Request.Path}{context.Request.QueryString}");
context.Response.StatusCode = 307;
return;
}