feat: add custom domains

This commit is contained in:
2026-04-10 05:09:28 +04:00
parent 34470197d1
commit b80258f17e
9 changed files with 201 additions and 13 deletions
+1
View File
@@ -744,6 +744,7 @@ export const dashboard = new Elysia()
auto_refresh_s: Number(b.auto_refresh_s) || 60,
og_image_url: b.og_image_url || null,
password: b.password || undefined,
custom_domain: b.custom_domain || null,
custom_css: b.custom_css || null,
footer_text: b.footer_text || null,
groups: groupsForApi,
+1
View File
@@ -297,6 +297,7 @@ Content-Type: application/json
<tr><td>bar_frequency</td><td>string?</td><td><code>hourly</code> or <code>daily</code>. Default <code>daily</code>.</td></tr>
<tr><td>bar_count</td><td>number?</td><td>How many bars to show (1-180). Default 90.</td></tr>
<tr><td>auto_refresh_s</td><td>number?</td><td>Auto-refresh interval in seconds (10-3600). Default 60.</td></tr>
<tr><td>custom_domain</td><td>string?</td><td>Custom domain for the page (e.g. <code>status.example.com</code>). CNAME to the status server IP. SSL is automatic.</td></tr>
<tr><td>custom_css</td><td>string?</td><td>Custom CSS injected after the default stylesheet (up to 50KB).</td></tr>
<tr><td>footer_text</td><td>string?</td><td>Text shown in the page footer (up to 5000 chars).</td></tr>
<tr><td>og_image_url</td><td>string?</td><td>OpenGraph image URL for social previews.</td></tr>
+7
View File
@@ -44,6 +44,13 @@
<p class="text-xs text-gray-600 mt-1">Public URL: <span class="text-blue-400 font-mono">status.pingql.com/<your-slug></span></p>
</div>
<div>
<label class="block text-sm text-gray-400 mb-1.5">Custom domain <span class="text-gray-600">(optional)</span></label>
<input name="custom_domain" type="text" value="<%= p.custom_domain || '' %>" placeholder="status.example.com"
class="w-full bg-surface-solid border border-border-subtle rounded-lg px-4 py-2.5 text-gray-100 placeholder-gray-600 focus:outline-none focus:border-blue-500 font-mono text-sm">
<p class="text-xs text-gray-600 mt-1">Point a CNAME to <span class="text-blue-400 font-mono">status.pingql.com</span> and enter the domain here. SSL is automatic.</p>
</div>
<div>
<label class="block text-sm text-gray-400 mb-1.5">Title</label>
<input name="title" type="text" required value="<%= p.title || '' %>" placeholder="My App Status"