diff --git a/Jellyfin.Api/Middleware/IpBasedAccessValidationMiddleware.cs b/Jellyfin.Api/Middleware/IpBasedAccessValidationMiddleware.cs index 0d107d11b..842a69dd9 100644 --- a/Jellyfin.Api/Middleware/IpBasedAccessValidationMiddleware.cs +++ b/Jellyfin.Api/Middleware/IpBasedAccessValidationMiddleware.cs @@ -42,7 +42,7 @@ public class IPBasedAccessValidationMiddleware if (!networkManager.HasRemoteAccess(remoteIP)) { // No access from network, respond with 503 instead of 200. - httpContext.Response.StatusCode = (int)HttpStatusCode.ServiceUnavailable; + httpContext.Response.StatusCode = StatusCodes.Status503ServiceUnavailable; return; } diff --git a/Jellyfin.Api/Middleware/LanFilteringMiddleware.cs b/Jellyfin.Api/Middleware/LanFilteringMiddleware.cs index 34ed4818f..35b0a1dd0 100644 --- a/Jellyfin.Api/Middleware/LanFilteringMiddleware.cs +++ b/Jellyfin.Api/Middleware/LanFilteringMiddleware.cs @@ -42,7 +42,7 @@ public class LanFilteringMiddleware if (!networkManager.IsInLocalNetwork(host)) { // No access from network, respond with 503 instead of 200. - httpContext.Response.StatusCode = (int)HttpStatusCode.ServiceUnavailable; + httpContext.Response.StatusCode = StatusCodes.Status503ServiceUnavailable; return; }