@sveltejs/kit 1.0.0-next.205 → 1.0.0-next.206
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +2 -2
- package/dist/ssr.js +9 -13
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -836,7 +836,7 @@ async function launch(port, https) {
|
|
|
836
836
|
exec(`${cmd} ${https ? 'https' : 'http'}://localhost:${port}`);
|
|
837
837
|
}
|
|
838
838
|
|
|
839
|
-
const prog = sade('svelte-kit').version('1.0.0-next.
|
|
839
|
+
const prog = sade('svelte-kit').version('1.0.0-next.206');
|
|
840
840
|
|
|
841
841
|
prog
|
|
842
842
|
.command('dev')
|
|
@@ -1001,7 +1001,7 @@ async function check_port(port) {
|
|
|
1001
1001
|
function welcome({ port, host, https, open, loose, allow, cwd }) {
|
|
1002
1002
|
if (open) launch(port, https);
|
|
1003
1003
|
|
|
1004
|
-
console.log($.bold().cyan(`\n SvelteKit v${'1.0.0-next.
|
|
1004
|
+
console.log($.bold().cyan(`\n SvelteKit v${'1.0.0-next.206'}\n`));
|
|
1005
1005
|
|
|
1006
1006
|
const protocol = https ? 'https:' : 'http:';
|
|
1007
1007
|
const exposed = typeof host !== 'undefined' && host !== 'localhost' && host !== '127.0.0.1';
|
package/dist/ssr.js
CHANGED
|
@@ -875,6 +875,8 @@ async function load_node({
|
|
|
875
875
|
};
|
|
876
876
|
}
|
|
877
877
|
|
|
878
|
+
opts.headers = new Headers(opts.headers);
|
|
879
|
+
|
|
878
880
|
const resolved = resolve(request.path, url.split('?')[0]);
|
|
879
881
|
|
|
880
882
|
let response;
|
|
@@ -903,18 +905,16 @@ async function load_node({
|
|
|
903
905
|
} else if (is_root_relative(resolved)) {
|
|
904
906
|
const relative = resolved;
|
|
905
907
|
|
|
906
|
-
const headers = /** @type {import('types/helper').RequestHeaders} */ ({
|
|
907
|
-
...opts.headers
|
|
908
|
-
});
|
|
909
|
-
|
|
910
908
|
// TODO: fix type https://github.com/node-fetch/node-fetch/issues/1113
|
|
911
909
|
if (opts.credentials !== 'omit') {
|
|
912
910
|
uses_credentials = true;
|
|
913
911
|
|
|
914
|
-
|
|
912
|
+
if (request.headers.cookie) {
|
|
913
|
+
opts.headers.set('cookie', request.headers.cookie);
|
|
914
|
+
}
|
|
915
915
|
|
|
916
|
-
if (!headers.authorization) {
|
|
917
|
-
headers.authorization
|
|
916
|
+
if (request.headers.authorization && !opts.headers.has('authorization')) {
|
|
917
|
+
opts.headers.set('authorization', request.headers.authorization);
|
|
918
918
|
}
|
|
919
919
|
}
|
|
920
920
|
|
|
@@ -932,7 +932,7 @@ async function load_node({
|
|
|
932
932
|
{
|
|
933
933
|
host: request.host,
|
|
934
934
|
method: opts.method || 'GET',
|
|
935
|
-
headers,
|
|
935
|
+
headers: Object.fromEntries(opts.headers),
|
|
936
936
|
path: relative,
|
|
937
937
|
rawBody: opts.body == null ? null : new TextEncoder().encode(opts.body),
|
|
938
938
|
query: new URLSearchParams(search)
|
|
@@ -981,11 +981,7 @@ async function load_node({
|
|
|
981
981
|
opts.credentials !== 'omit'
|
|
982
982
|
) {
|
|
983
983
|
uses_credentials = true;
|
|
984
|
-
|
|
985
|
-
opts.headers = {
|
|
986
|
-
...opts.headers,
|
|
987
|
-
cookie: request.headers.cookie
|
|
988
|
-
};
|
|
984
|
+
opts.headers.set('cookie', request.headers.cookie);
|
|
989
985
|
}
|
|
990
986
|
}
|
|
991
987
|
|