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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "socket-function",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
4
4
  "main": "index.js",
5
5
  "license": "MIT",
6
6
  "dependencies": {
@@ -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 !== "/" && !requireCalls?.length) {
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
  }