Merge pull request #3718 from harsh-aghara/feat/accept-status-codes-frontend

Add customUpCodes support for HTTP monitors (Frontend)
This commit is contained in:
Alexander Holliday authored and GitHub committed 2026-06-18 10:51:03 -07:00
commit b28c84436e
8 files changed
+262 -1

No files matched your search

+23 -1
View File
@@ -4,7 +4,29 @@ import type { GeoContinent, GroupedGeoCheck } from "@/domain/geo-checks/geo-chec
export type { GeoContinent } from "@/domain/geo-checks/geo-check.type.js";
import http from "node:http";
export const HttpStatusCodes = Object.keys(http.STATUS_CODES).map(Number);
export const HttpStatusCodes = [
...Object.keys(http.STATUS_CODES).map(Number),
419, // Page Expired (Laravel)
420, // Enhance Your Calm (Twitter)
440, // Login Time-out (IIS)
449, // Retry With (IIS)
460, // Client Closed Connection (AWS ELB)
463, // X-Forwarded-For Too Large (AWS ELB)
497, // HTTP Request Sent to HTTPS Port (NGINX)
499, // Client Closed Request (NGINX)
509, // Bandwidth Limit Exceeded (Apache)
520, // Web Server Returned an Unknown Error (Cloudflare)
521, // Web Server Is Down (Cloudflare)
522, // Connection Timed Out (Cloudflare)
523, // Origin Is Unreachable (Cloudflare)
524, // A Timeout Occurred (Cloudflare)
525, // SSL Handshake Failed (Cloudflare)
526, // Invalid SSL Certificate (Cloudflare)
527, // Railgun Error (Cloudflare)
529, // Site is overloaded
530, // Site is frozen (Cloudflare)
561, // Unauthorized (AWS ELB)
];
export const HttpStatusCodeSet = new Set(HttpStatusCodes);
export type HttpStatusCode = number;