basic-node-server 1.0.5 → 1.0.6

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.
Files changed (2) hide show
  1. package/bns.js +3 -0
  2. package/package.json +1 -1
package/bns.js CHANGED
@@ -23,6 +23,9 @@ const server = http.createServer((req, res) => {
23
23
  // Extract the file path from the request URL
24
24
  let filePath = path.join(process.cwd(), req.url);
25
25
 
26
+ // remove get query string
27
+ filePath = filePath.split('?')[0];
28
+
26
29
  // If filePath is empty or ends with '/', default to 'index.html'
27
30
  if (!filePath || filePath.endsWith('/')) {
28
31
  filePath = path.join(filePath, 'index.html');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "basic-node-server",
3
- "version": "1.0.5",
3
+ "version": "1.0.6",
4
4
  "description": "Basic node server for everyone.",
5
5
  "main": "bns.js",
6
6
  "scripts": {