1
0
Fork 0
mirror of https://github.com/Radarr/Radarr synced 2025-01-03 05:44:50 +00:00

New: Use 307 redirect for requests missing URL Base

This commit is contained in:
Mark McDowall 2024-10-04 19:19:12 -07:00 committed by Bogdan
parent da1b53b7e2
commit f6542bab0a

View file

@ -20,6 +20,8 @@ public async Task InvokeAsync(HttpContext context)
if (_urlBase.IsNotNullOrWhiteSpace() && context.Request.PathBase.Value.IsNullOrWhiteSpace())
{
context.Response.Redirect($"{_urlBase}{context.Request.Path}{context.Request.QueryString}");
context.Response.StatusCode = 307;
return;
}