diff options
| author | Cody Robibero <cody@robibe.ro> | 2024-01-06 14:43:19 -0700 |
|---|---|---|
| committer | Cody Robibero <cody@robibe.ro> | 2024-01-06 14:43:19 -0700 |
| commit | adb0837dc219df6f9474d819c68a73f8c3decf48 (patch) | |
| tree | febb8b09227be45ae80a6565d00b466e0acbf39f /Jellyfin.Api/Middleware/IpBasedAccessValidationMiddleware.cs | |
| parent | f49de51225b2206609df6a89f3cbb5fd7459ff68 (diff) | |
Respond with Service Unavailable if not in correct network
Diffstat (limited to 'Jellyfin.Api/Middleware/IpBasedAccessValidationMiddleware.cs')
| -rw-r--r-- | Jellyfin.Api/Middleware/IpBasedAccessValidationMiddleware.cs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Jellyfin.Api/Middleware/IpBasedAccessValidationMiddleware.cs b/Jellyfin.Api/Middleware/IpBasedAccessValidationMiddleware.cs index 27bcd5570..0d107d11b 100644 --- a/Jellyfin.Api/Middleware/IpBasedAccessValidationMiddleware.cs +++ b/Jellyfin.Api/Middleware/IpBasedAccessValidationMiddleware.cs @@ -41,6 +41,8 @@ public class IPBasedAccessValidationMiddleware if (!networkManager.HasRemoteAccess(remoteIP)) { + // No access from network, respond with 503 instead of 200. + httpContext.Response.StatusCode = (int)HttpStatusCode.ServiceUnavailable; return; } |
