Skip to content

Commit 68ea159

Browse files
committed
feat: support /install.sh URL
Redirect /install.sh to the raw install script for cleaner URL.
1 parent 5c1ad6a commit 68ea159

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/hooks.server.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
11
import type { Handle } from '@sveltejs/kit';
22
import { generateInstallScript } from '$lib/server/install-script';
33

4+
const INSTALL_SCRIPT_URL = 'https://raw.githubusercontent.com/openbootdotdev/openboot/main/scripts/install.sh';
5+
46
export const handle: Handle = async ({ event, resolve }) => {
57
const path = event.url.pathname;
68

9+
if (path === '/install.sh') {
10+
return Response.redirect(INSTALL_SCRIPT_URL, 302);
11+
}
12+
713
const shortAliasMatch = path.match(/^\/([a-z0-9-]+)$/);
814
if (shortAliasMatch && !['dashboard', 'api', 'install', 'docs', 'cli-auth'].includes(shortAliasMatch[1])) {
915
const alias = shortAliasMatch[1];

0 commit comments

Comments
 (0)