@daemonitor/plugins 1.1.14 → 1.1.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -89,6 +89,25 @@ export function createWebsitePlugin() {
|
|
|
89
89
|
const start = Date.now();
|
|
90
90
|
const label = ep.name || ep.url;
|
|
91
91
|
const uid = `web-${(ep.name || ep.url).replace(/[^a-zA-Z0-9_.-]+/g, "-")}`;
|
|
92
|
+
// Origin-only monitor: skip the public tier (unreachable behind a CDN bot
|
|
93
|
+
// challenge) and report the direct origin check as the endpoint's health.
|
|
94
|
+
if (ep.originOnly && ep.origin?.url) {
|
|
95
|
+
const o = await checkOrigin(ep);
|
|
96
|
+
await plugin.send({
|
|
97
|
+
name: label,
|
|
98
|
+
url: ep.url || o.url,
|
|
99
|
+
status: o.status,
|
|
100
|
+
duration: o.duration,
|
|
101
|
+
ok: o.ok,
|
|
102
|
+
originOnly: true,
|
|
103
|
+
hasAllExpectedStrings: o.hasAllExpectedStrings,
|
|
104
|
+
hasAnyUnexpectedStrings: o.hasAnyUnexpectedStrings,
|
|
105
|
+
missingExpected: o.missingExpected,
|
|
106
|
+
matchedUnexpected: o.matchedUnexpected,
|
|
107
|
+
error: o.error,
|
|
108
|
+
}, uid);
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
92
111
|
let publicResult;
|
|
93
112
|
try {
|
|
94
113
|
const ctrl = new AbortController();
|