Skip to content
This repository was archived by the owner on Jan 11, 2023. It is now read-only.

Commit f9f2836

Browse files
authored
Merge pull request #409 from sveltejs/fix-redirects
don't include origin in export redirects
2 parents fe5a8fb + a18af2a commit f9f2836

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/api/export.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ async function execute(emitter: EventEmitter, opts: Opts) {
170170
const location = r.headers.get('Location');
171171

172172
type = 'text/html';
173-
body = `<script>window.location.href = "${location}"</script>`;
173+
body = `<script>window.location.href = "${location.replace(root.href, '')}"</script>`;
174174

175175
await handle(resolve(root.href, location));
176176
}

0 commit comments

Comments
 (0)