New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

corsica

Package Overview
Dependencies
Maintainers
3
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

corsica - npm Package Compare versions

Comparing version 2.0.0 to 2.1.0

2

lib/config.js

@@ -10,2 +10,4 @@ var fs = require('fs');

STATE_PATH: './state.json',
force_https: false,
hsts_time: 60 * 24 * 60 * 60, // 60 days in seconds
};

@@ -12,0 +14,0 @@

@@ -6,2 +6,4 @@ var fs = require('fs');

var express = require('express');
var helmet = require('helmet');
var express_enforces_ssl = require('express-enforces-ssl');

@@ -16,4 +18,5 @@ var utils = require('./utils');

app.use(helmet.hidePoweredBy());
app.use(express.compress());
app.use(express.static(staticPath));
app.use(express.json());

@@ -62,2 +65,12 @@

core = core_;
if (core.config.force_https) {
console.log("Forcing HTTPS. Setting HSTS to " + core.config.hsts_time + " seconds");
app.enable('trust proxy');
app.use(helmet.hsts({maxAge: core.config.hsts_time}));
app.use(express_enforces_ssl());
}
app.use(express.static(staticPath));
app.set('port', core.config.PORT);

@@ -71,3 +84,3 @@ server = http.createServer(app);

server.listen(app.get('port'), function() {
console.log('Listening on https://0.0.0.0:{0}'.format(app.get('port')));
console.log('Listening on http://0.0.0.0:{0}'.format(app.get('port')));
});

@@ -74,0 +87,0 @@ }

4

package.json
{
"name": "corsica",
"version": "2.0.0",
"version": "2.1.0",
"description": "Ephemeral screens for the masses.",

@@ -22,2 +22,4 @@ "main": "index.js",

"express": "3.4.8",
"express-enforces-ssl": "^1.1.0",
"helmet": "^3.5.0",
"minimatch": "^3.0.3",

@@ -24,0 +26,0 @@ "request": "^2.80.0",

@@ -86,15 +86,15 @@ /* Description:

var from;
var to;
var start;
var end;
if (c.from) {
from = Date.parse(c.from);
if (c.start) {
start = Date.parse(c.start);
} else {
from = 0;
start = 0;
}
if (c.to) {
to = Date.parse(c.to);
if (c.end) {
end = Date.parse(c.end);
} else {
to = Infinity;
end = Infinity;
}

@@ -104,3 +104,3 @@

return from < now && now < to;
return start < now && now < end;
});

@@ -107,0 +107,0 @@

@@ -25,3 +25,3 @@ console.log(

if (!config.tags) {
config.tags = [];
config.tags = ['default'];
writeConfig();

@@ -28,0 +28,0 @@ }

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