@allegiant/static
Advanced tools
Comparing version 0.0.7 to 0.0.8
15
index.js
@@ -8,3 +8,2 @@ const fs = require('fs'); | ||
conn.status = 500; | ||
conn.statusMessage = conn.getStatusMessage(500); | ||
return false; | ||
@@ -21,6 +20,3 @@ } | ||
conn.writeHead(404, { | ||
'Content-Type': conn.mime.type('.html', 'utf-8'), | ||
}, conn.getStatusMessage(404)); | ||
conn.status = 404; | ||
return false; | ||
@@ -31,3 +27,3 @@ } | ||
console.log(conn.uri + " :: Directory Read Attempt: "); // eslint-disable-line | ||
conn.writeHead(403, {}, conn.getStatusMessage(403)); | ||
conn.status = 403; | ||
@@ -41,6 +37,5 @@ return false; | ||
conn.writeHead(200, { | ||
'Last-Modified': conn.stat.mtime.toUTCString(), | ||
'Content-Length': conn.stat.size | ||
}); | ||
conn.status = 200; | ||
conn.setHeader('Last-Modified', conn.stat.mtime.toUTCString()); | ||
conn.setHeader('Content-Length', conn.stat.size); | ||
@@ -47,0 +42,0 @@ return conn.streamReadable(fs.createReadStream(conn.fname)); |
{ | ||
"name": "@allegiant/static", | ||
"version": "0.0.7", | ||
"version": "0.0.8", | ||
"description": "Static files module for the allegiant app framework.", | ||
@@ -5,0 +5,0 @@ "author": "echopoint <echopoint@tutanota.com>", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6409
72