Serve routes without .html file extension

This commit is contained in:
thiloho
2024-09-07 18:22:58 +02:00
parent 6a7e64ccaf
commit 9a8a333823
7 changed files with 11 additions and 11 deletions

View File

@@ -58,13 +58,13 @@ export const load: PageServerLoad = async ({ params, fetch, cookies, parent }) =
: process.env.ORIGIN
? process.env.ORIGIN
: "http://localhost:18000"
}/previews/${websiteOverview.id}/index.html`;
}/previews/${websiteOverview.id}/`;
const websiteProdUrl = dev
? `http://localhost:18000/${websiteOverview.id}/index.html`
? `http://localhost:18000/${websiteOverview.id}/`
: process.env.ORIGIN
? process.env.ORIGIN.replace("//", `//${websiteOverview.id}.`)
: `http://localhost:18000/${websiteOverview.id}/index.html`;
: `http://localhost:18000/${websiteOverview.id}/`;
return {
websiteOverview,