// node-fetch will generate this for us. if we keep 'Host', it won't change with redirects!

This commit is contained in:
tamaina 2024-07-17 23:28:37 +09:00
parent 1f0e7a40b6
commit de677a5b1f
1 changed files with 2 additions and 0 deletions

View File

@ -40,6 +40,7 @@ export async function createSignedPost(args: { level: string; key: PrivateKey; u
['(request-target)', 'date', 'host', 'digest'],
);
// node-fetch will generate this for us. if we keep 'Host', it won't change with redirects!
delete request.headers['Host'];
return {
@ -68,6 +69,7 @@ export async function createSignedGet(args: { level: string; key: PrivateKey; ur
['(request-target)', 'date', 'host', 'accept'],
);
// node-fetch will generate this for us. if we keep 'Host', it won't change with redirects!
delete request.headers['Host'];
return {