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

@lbu/server

Package Overview
Dependencies
Maintainers
2
Versions
98
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lbu/server - npm Package Compare versions

Comparing version 0.0.91 to 0.0.92

8

package.json
{
"name": "@lbu/server",
"version": "0.0.91",
"version": "0.0.92",
"description": "Koa server and common middleware",

@@ -19,4 +19,4 @@ "main": "./index.js",

"dependencies": {
"@lbu/insight": "0.0.91",
"@lbu/stdlib": "0.0.91",
"@lbu/insight": "0.0.92",
"@lbu/stdlib": "0.0.92",
"formidable": "2.0.0-canary.20200504.1",

@@ -49,3 +49,3 @@ "keygrip": "1.1.0",

},
"gitHead": "241012842c62b2eb255e9a503da837e32bbef548"
"gitHead": "68be0c5c1f7177797820b1cf2ef061542004dfd3"
}

@@ -1,2 +0,2 @@

import { isStaging } from "@lbu/stdlib";
import { environment, isStaging } from "@lbu/stdlib";

@@ -65,7 +65,7 @@ /*

} else if (
process.env.CORS_URL !== undefined &&
process.env.CORS_URL.length > 0
environment.CORS_URL !== undefined &&
environment.CORS_URL.length > 0
) {
// Use CORS_URL array provided via environment variables
const allowedOrigins = (process.env.CORS_URL || "").split(",");
const allowedOrigins = (environment.CORS_URL || "").split(",");
const localhostRegex = /^http:\/\/localhost:\d{1,6}$/gi;

@@ -72,0 +72,0 @@

@@ -1,2 +0,2 @@

import { isNil, isProduction, merge, uuid } from "@lbu/stdlib";
import { environment, isNil, isProduction, merge, uuid } from "@lbu/stdlib";
import KeyGrip from "keygrip";

@@ -20,7 +20,7 @@ import koaSession from "koa-session";

{
key: `${process.env.APP_NAME.toLowerCase()}.sess`,
key: `${environment.APP_NAME.toLowerCase()}.sess`,
maxAge: 6 * 24 * 60 * 60 * 1000,
renew: true,
secure: isProduction(),
domain: !isProduction() ? undefined : process.env.COOKIE_URL,
domain: !isProduction() ? undefined : environment.COOKIE_URL,
sameSite: "lax",

@@ -48,10 +48,10 @@ overwrite: true,

if (!isProduction()) {
return [process.env.APP_NAME];
return [environment.APP_NAME];
}
if (isNil(process.env.APP_KEYS) || process.env.APP_KEYS.length < 20) {
if (isNil(environment.APP_KEYS) || environment.APP_KEYS.length < 20) {
throw new Error("Missing APP_KEYS in environment or generate a longer key");
}
const keys = process.env.APP_KEYS.split(",");
const keys = environment.APP_KEYS.split(",");
return new KeyGrip(keys, "sha256");

@@ -58,0 +58,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