socket-function 1.0.4 → 1.0.5
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/package.json
CHANGED
|
@@ -126,7 +126,7 @@ class RequireControllerBase {
|
|
|
126
126
|
}
|
|
127
127
|
if (httpRequest) {
|
|
128
128
|
let urlObj = new URL("https://" + httpRequest.headers.host + httpRequest.url);
|
|
129
|
-
if (urlObj.pathname !== "/" &&
|
|
129
|
+
if (urlObj.pathname !== "/" && staticRoots.length > 0) {
|
|
130
130
|
if (urlObj.pathname.includes("..")) {
|
|
131
131
|
throw new Error(`Invalid path, may not have ".." in the path, ${urlObj.pathname}`);
|
|
132
132
|
}
|