Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

yaserver

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

yaserver - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

12

out/index.js

@@ -31,2 +31,10 @@ "use strict";

}
function redirect(req, res, location) {
return __awaiter(this, void 0, void 0, function* () {
res.writeHead(302, 'Found', {
'Location': location
});
res.end(`Location: ${location}`);
});
}
function serveFile(req, res, extname, content) {

@@ -143,2 +151,6 @@ return __awaiter(this, void 0, void 0, function* () {

}
const expectedRequestPath = `/${path.relative(rootDir, requestedPath).replace(/\\/g, '/')}/`;
if (pathname !== expectedRequestPath) {
return redirect(req, res, expectedRequestPath);
}
const indexPath = path.normalize(path.join(requestedPath, 'index.html'));

@@ -145,0 +157,0 @@ const indexContent = yield fsSafeRead(indexPath);

2

package.json
{
"name": "yaserver",
"version": "0.1.0",
"version": "0.1.1",
"description": "Yet Another Server",

@@ -5,0 +5,0 @@ "main": "out/index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc