Merge pull request #409 from sveltejs/fix-redirects

don't include origin in export redirects
This commit is contained in:
Rich Harris
2018-09-02 18:26:56 -04:00
committed by GitHub

View File

@@ -170,7 +170,7 @@ async function execute(emitter: EventEmitter, opts: Opts) {
const location = r.headers.get('Location');
type = 'text/html';
body = `<script>window.location.href = "${location}"</script>`;
body = `<script>window.location.href = "${location.replace(root.href, '')}"</script>`;
await handle(resolve(root.href, location));
}