New: Use 307 redirect for requests missing URL Base

(cherry picked from commit 39074b0b1d040969f86d787c2346d5ed5a9f72dc)
pull/3799/head v0.4.1.2648
Mark McDowall 4 months ago committed by Bogdan
parent 8192c22910
commit 9312f17041

@ -20,6 +20,8 @@ namespace Readarr.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;
}

Loading…
Cancel
Save