Upgrade h3

This commit is contained in:
mrjvs
2024-01-04 20:16:53 +01:00
parent 054ea6aa07
commit 882e26fa1b
3 changed files with 28 additions and 15 deletions

View File

@@ -15,7 +15,7 @@
"preinstall": "npx only-allow pnpm"
},
"dependencies": {
"h3": "^1.8.1",
"h3": "^1.9.0",
"jose": "^5.2.0",
"nitropack": "latest"
},

38
pnpm-lock.yaml generated
View File

@@ -6,8 +6,8 @@ settings:
dependencies:
h3:
specifier: ^1.8.1
version: 1.8.1
specifier: ^1.9.0
version: 1.9.0
jose:
specifier: ^5.2.0
version: 5.2.0
@@ -1402,6 +1402,10 @@ packages:
resolution: {integrity: sha512-+uO4+qr7msjNNWKYPHqN/3+Dx3NFkmIzayk2L1MyZQlvgZb/J1A0fo410dpKrN2SnqFjt8n4JL8fDJE0wIgjFQ==}
dev: false
/defu@6.1.3:
resolution: {integrity: sha512-Vy2wmG3NTkmHNg/kzpuvHhkqeIx3ODWqasgCRbKtbXEN0G+HpEEv9BtJLp7ZG1CZloFaC41Ah3ZFbq7aqCqMeQ==}
dev: false
/delegates@1.0.0:
resolution: {integrity: sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==}
dev: false
@@ -1420,6 +1424,10 @@ packages:
resolution: {integrity: sha512-M1Ob1zPSIvlARiJUkKqvAZ3VAqQY6Jcuth/pBKQ2b1dX/Qx0OnJ8Vux6J2H5PTMQeRzWrrbTu70VxBfv/OPDJA==}
dev: false
/destr@2.0.2:
resolution: {integrity: sha512-65AlobnZMiCET00KaFFjUefxDX0khFA/E4myqZ7a6Sq1yZtR8+FVIvilVX66vF2uobSumxooYZChiRPCKNqhmg==}
dev: false
/destroy@1.2.0:
resolution: {integrity: sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==}
engines: {node: '>= 0.8', npm: 1.2.8000 || >= 1.4.16}
@@ -2180,15 +2188,15 @@ packages:
duplexer: 0.1.2
dev: false
/h3@1.8.1:
resolution: {integrity: sha512-m5rFuu+5bpwBBHqqS0zexjK+Q8dhtFRvO9JXQG0RvSPL6QrIT6vv42vuBM22SLOgGMoZYsHk0y7VPidt9s+nkw==}
/h3@1.9.0:
resolution: {integrity: sha512-+F3ZqrNV/CFXXfZ2lXBINHi+rM4Xw3CDC5z2CDK3NMPocjonKipGLLDSkrqY9DOrioZNPTIdDMWfQKm//3X2DA==}
dependencies:
cookie-es: 1.0.0
defu: 6.1.2
destr: 2.0.1
iron-webcrypto: 0.8.2
defu: 6.1.3
destr: 2.0.2
iron-webcrypto: 1.0.0
radix3: 1.1.0
ufo: 1.3.0
ufo: 1.3.2
uncrypto: 0.1.3
unenv: 1.7.4
dev: false
@@ -2330,8 +2338,8 @@ packages:
- supports-color
dev: false
/iron-webcrypto@0.8.2:
resolution: {integrity: sha512-jGiwmpgTuF19Vt4hn3+AzaVFGpVZt7A1ysd5ivFel2r4aNVFwqaYa6aU6qsF1PM7b+WFivZHz3nipwUOXaOnHg==}
/iron-webcrypto@1.0.0:
resolution: {integrity: sha512-anOK1Mktt8U1Xi7fCM3RELTuYbnFikQY5VtrDj7kPgpejV7d43tWKhzgioO0zpkazLEL/j/iayRqnJhrGfqUsg==}
dev: false
/is-array-buffer@3.0.2:
@@ -2615,7 +2623,7 @@ packages:
consola: 3.2.3
defu: 6.1.2
get-port-please: 3.1.1
h3: 1.8.1
h3: 1.9.0
http-shutdown: 1.2.2
jiti: 1.20.0
mlly: 1.4.2
@@ -2834,7 +2842,7 @@ packages:
fs-extra: 11.1.1
globby: 13.2.2
gzip-size: 7.0.0
h3: 1.8.1
h3: 1.9.0
hookable: 5.5.3
httpxy: 0.1.5
is-primitive: 3.0.1
@@ -3778,6 +3786,10 @@ packages:
resolution: {integrity: sha512-bRn3CsoojyNStCZe0BG0Mt4Nr/4KF+rhFlnNXybgqt5pXHNFRlqinSoQaTrGyzE4X8aHplSb+TorH+COin9Yxw==}
dev: false
/ufo@1.3.2:
resolution: {integrity: sha512-o+ORpgGwaYQXgqGDwd+hkS4PuZ3QnmqMMxRuajK/a38L6fTpcE5GPIfrf+L/KemFzfUpeUQc1rRS1iDBozvnFA==}
dev: false
/unbox-primitive@1.0.2:
resolution: {integrity: sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==}
dependencies:
@@ -3890,7 +3902,7 @@ packages:
anymatch: 3.1.3
chokidar: 3.5.3
destr: 2.0.1
h3: 1.8.1
h3: 1.9.0
ioredis: 5.3.2
listhen: 1.5.1
lru-cache: 10.0.1

View File

@@ -11,6 +11,7 @@ const blacklistedHeaders = [
'x-forwarded-proto',
'forwarded',
'x-real-ip',
'user-agent',
];
function copyHeader(
@@ -26,7 +27,7 @@ function copyHeader(
export function getProxyHeaders(headers: Headers): Headers {
const output = new Headers();
// default user-agent
// default user agent
output.set(
'User-Agent',
'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:93.0) Gecko/20100101 Firefox/93.0',