@tinyhttp/app
Advanced tools
+1
-1
@@ -114,3 +114,3 @@ import { createServer } from 'node:http'; | ||
| if (!view) { | ||
| const ViewClass = this.settings.view || View; | ||
| const ViewClass = this.settings.view; | ||
| try { | ||
@@ -117,0 +117,0 @@ view = new ViewClass(name, { |
+1
-5
@@ -14,3 +14,3 @@ import { isIP } from 'node:net'; | ||
| return proto; | ||
| const header = req.headers['X-Forwarded-Proto'] || proto; | ||
| const header = req.headers['x-forwarded-proto'] || proto; | ||
| const index = header.indexOf(','); | ||
@@ -22,4 +22,2 @@ return index !== -1 ? header.substring(0, index).trim() : header.trim(); | ||
| const authority = req.get(':authority'); | ||
| if (Array.isArray(authority)) | ||
| return undefined; | ||
| if (Array.isArray(authority) || !authority) | ||
@@ -44,4 +42,2 @@ return undefined; | ||
| return undefined; | ||
| if (host.indexOf(',') !== -1) | ||
| return undefined; | ||
| return normalizeHostString(host); | ||
@@ -48,0 +44,0 @@ }; |
+4
-4
| { | ||
| "name": "@tinyhttp/app", | ||
| "version": "3.0.3", | ||
| "version": "3.0.4", | ||
| "description": "0-legacy, tiny & fast web framework as a replacement of Express", | ||
@@ -38,6 +38,6 @@ "type": "module", | ||
| "@tinyhttp/cookie": "2.1.1", | ||
| "@tinyhttp/proxy-addr": "3.0.0", | ||
| "@tinyhttp/router": "2.2.3", | ||
| "@tinyhttp/proxy-addr": "3.0.1", | ||
| "@tinyhttp/req": "2.2.7", | ||
| "@tinyhttp/res": "2.2.8" | ||
| "@tinyhttp/res": "2.2.9", | ||
| "@tinyhttp/router": "2.2.3" | ||
| }, | ||
@@ -44,0 +44,0 @@ "scripts": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
75185
-0.36%920
-0.43%+ Added
+ Added
+ Added
- Removed
- Removed
- Removed
- Removed
Updated
Updated