Skip to content

Commit

Permalink
fix: change url protocol for prerender
Browse files Browse the repository at this point in the history
  • Loading branch information
bluwy committed Jan 2, 2022
1 parent 943835f commit e74b617
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/gentle-rules-camp.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sveltejs/kit': patch
---

Fix url pathname for prerenders
4 changes: 2 additions & 2 deletions packages/kit/src/core/adapt/prerender.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ export async function prerender({ cwd, out, log, config, build_data, fallback, a

const rendered = await app.render(
{
url: `${config.kit.protocol || 'sveltekit'}://${config.kit.host || 'prerender'}${path}`,
url: `${config.kit.protocol || 'http'}://${config.kit.host || 'prerender'}${path}`,
method: 'GET',
headers: {},
rawBody: null
Expand Down Expand Up @@ -329,7 +329,7 @@ export async function prerender({ cwd, out, log, config, build_data, fallback, a
if (fallback) {
const rendered = await app.render(
{
url: `${config.kit.host || 'sveltekit'}://${config.kit.host || 'prerender'}/[fallback]`,
url: `${config.kit.protocol || 'http'}://${config.kit.host || 'prerender'}/[fallback]`,
method: 'GET',
headers: {},
rawBody: null
Expand Down

0 comments on commit e74b617

Please sign in to comment.