mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-06-23 15:30:56 -04:00
Use StatusCodes which is already an int
This commit is contained in:
parent
adb0837dc2
commit
fa0413d6e4
@ -42,7 +42,7 @@ public class IPBasedAccessValidationMiddleware
|
|||||||
if (!networkManager.HasRemoteAccess(remoteIP))
|
if (!networkManager.HasRemoteAccess(remoteIP))
|
||||||
{
|
{
|
||||||
// No access from network, respond with 503 instead of 200.
|
// No access from network, respond with 503 instead of 200.
|
||||||
httpContext.Response.StatusCode = (int)HttpStatusCode.ServiceUnavailable;
|
httpContext.Response.StatusCode = StatusCodes.Status503ServiceUnavailable;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -42,7 +42,7 @@ public class LanFilteringMiddleware
|
|||||||
if (!networkManager.IsInLocalNetwork(host))
|
if (!networkManager.IsInLocalNetwork(host))
|
||||||
{
|
{
|
||||||
// No access from network, respond with 503 instead of 200.
|
// No access from network, respond with 503 instead of 200.
|
||||||
httpContext.Response.StatusCode = (int)HttpStatusCode.ServiceUnavailable;
|
httpContext.Response.StatusCode = StatusCodes.Status503ServiceUnavailable;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user