diff --git a/package-lock.json b/package-lock.json index 72a16d3c..6fdbe0ea 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "kener", - "version": "4.1.1", + "version": "4.1.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "kener", - "version": "4.1.1", + "version": "4.1.2", "license": "MIT", "dependencies": { "@babel/runtime": "^7.28.4", diff --git a/package.json b/package.json index 315f0c27..d3eaaab7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "kener", - "version": "4.1.1", + "version": "4.1.2", "type": "module", "private": false, "license": "MIT", diff --git a/src/lib/server/services/apiCall.ts b/src/lib/server/services/apiCall.ts index 75f32b4b..b42fa586 100644 --- a/src/lib/server/services/apiCall.ts +++ b/src/lib/server/services/apiCall.ts @@ -64,13 +64,18 @@ class ApiCall { console.log(e); } } + const followRedirects = + this.monitor.type_data.follow_redirects ?? true; + + const maxRedirects = + this.monitor.type_data.max_redirects ?? 5; const options: AxiosRequestConfig = { method: method, headers: axiosHeaders, timeout: timeout, transformResponse: (r: string) => r, - maxRedirects: 5, + maxRedirects: followRedirects ? maxRedirects : 0, validateStatus: () => true, maxContentLength: Infinity, maxBodyLength: Infinity, diff --git a/src/lib/server/types/monitor.ts b/src/lib/server/types/monitor.ts index d038292c..aa14210d 100644 --- a/src/lib/server/types/monitor.ts +++ b/src/lib/server/types/monitor.ts @@ -26,6 +26,8 @@ export interface ApiMonitorTypeData { timeout?: number; eval?: string; allowSelfSignedCert?: boolean; + follow_redirects?: boolean; + max_redirects?: number; } export interface DnsMonitorTypeData { diff --git a/src/routes/(docs)/docs.json b/src/routes/(docs)/docs.json index db919e73..139954d7 100644 --- a/src/routes/(docs)/docs.json +++ b/src/routes/(docs)/docs.json @@ -311,6 +311,10 @@ "group": "v4.x", "collapsible": false, "pages": [ + { + "title": "v4.1.2", + "content": "v4/changelogs/v4.1.2" + }, { "title": "v4.1.1", "content": "v4/changelogs/v4.1.1" diff --git a/src/routes/(docs)/docs/content/v4/changelogs/v4.1.2.md b/src/routes/(docs)/docs/content/v4/changelogs/v4.1.2.md new file mode 100644 index 00000000..2a4a8213 --- /dev/null +++ b/src/routes/(docs)/docs/content/v4/changelogs/v4.1.2.md @@ -0,0 +1,41 @@ +--- +title: v4.1.2 Changelog +description: See what's new in Kener v4.1.2, including new features, improvements, and bug fixes +--- + +## New features {#new-features} + +### DNS-over-TLS for DNS monitors {#dns-over-tls} + +DNS monitors can now query resolvers over an encrypted connection. A new **`transport`** option (`UDP`, default, or `TLS`) enables DNS-over-TLS (RFC 7858) with supporting fields: + +- **`tlsPort`** (default `853`) — the DoT port on the resolver. +- **`tlsServername`** — TLS SNI hostname, needed when pointing at an IP-based resolver like `1.1.1.1`. +- **`allowSelfSignedCert`** — skip TLS verification for private resolvers. + +UDP lookups with a blank `nameServer` also got smarter: Kener now walks the zone's authoritative nameservers before falling back to `8.8.8.8`. See [DNS Monitor](/docs/v4/monitors/dns). + +### Redirect control for API monitors {#api-follow-redirects} + +API monitors gained a **Follow Redirects** toggle (default on) and a **Max Redirects** limit (default 5, up to 20). Turn the toggle off to evaluate the redirect response itself — its `3xx` status code and headers — instead of the destination, useful for monitoring that a redirect is in place or catching unexpected ones. + +## Improvements {#improvements} + +### Self-signed TLS for gRPC monitors {#grpc-insecure-tls} + +gRPC monitors with TLS enabled can now set **`insecure`** to skip certificate verification — the equivalent of `grpcurl -insecure` — for servers with self-signed certificates. See [gRPC Monitor](/docs/v4/monitors/grpc). + +### `external_url` in the monitors API {#external-url-api} + +The monitors API now accepts `external_url` in `POST` and `PATCH /api/v4/monitors` requests and returns it in monitor responses, so API-managed monitors can set their public link without a dashboard visit. + +### New and updated translations {#translations} + +Two new locales: **Traditional Chinese (Hong Kong)** `zh-HK` and **Traditional Chinese (Macau)** `zh-MO`. Simplified Chinese, Traditional Chinese (Taiwan), and Vietnamese translations were also refreshed. + +## Bug fixes {#bug-fixes} + +- **Incident comments notify subscribers.** Incidents created or updated from the dashboard or API never reached email subscribers — only alert-driven incidents did. Posting a comment on an incident now notifies "incidents" subscribers regardless of where the incident came from, and alert-driven incidents notify exactly once through the same path. Notification subjects now carry the incident state (e.g. `INVESTIGATING`). +- **Site theme respected on first visit.** The default color scheme configured in site settings is now applied to first-time visitors instead of only after they toggle the theme. +- **Favicon works with `KENER_BASE_PATH`.** The favicon now resolves correctly when Kener is served from a sub-path, and pages no longer break when no favicon is configured. +- **Charts re-render on id changes.** Chart container ids are now reactive, fixing stale chart styling when a chart's id changes after mount. diff --git a/src/routes/(manage)/manage/app/monitors/[tag]/types/monitor-api.svelte b/src/routes/(manage)/manage/app/monitors/[tag]/types/monitor-api.svelte index 77eab225..97580267 100644 --- a/src/routes/(manage)/manage/app/monitors/[tag]/types/monitor-api.svelte +++ b/src/routes/(manage)/manage/app/monitors/[tag]/types/monitor-api.svelte @@ -25,6 +25,10 @@ if (!data.eval) data.eval = DefaultAPIEval; if (data.allowSelfSignedCert === undefined) data.allowSelfSignedCert = false; + if (data.follow_redirects === undefined) data.follow_redirects = true; + if (data.max_redirects === undefined) data.max_redirects = 5; + + const methods = ["GET", "POST", "PUT", "PATCH", "DELETE", "HEAD", "OPTIONS"]; function addHeader() { @@ -103,6 +107,25 @@ +
+ + +
+ +
+ + +
+ +