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

highoutput-http-server

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

highoutput-http-server - npm Package Compare versions

Comparing version 0.0.4 to 0.0.5

2

build/index.d.ts

@@ -8,2 +8,3 @@ /// <reference types="node" />

type: 'jwt';
strict?: boolean;
options: {

@@ -14,2 +15,3 @@ secretKey: (() => Promise<string>) | string;

type: 'basic';
strict?: boolean;
options: {

@@ -16,0 +18,0 @@ authenticate: (username: string, password: string) => Promise<boolean>;

9

build/index.js

@@ -31,3 +31,3 @@ "use strict";

};
if (!ctx.headers.authorization) {
if (this.options.auth.strict && !ctx.headers.authorization) {
invalidToken();

@@ -38,3 +38,8 @@ return;

if (!match) {
invalidToken();
if (this.options.auth.strict) {
invalidToken();
}
else {
await next();
}
return;

@@ -41,0 +46,0 @@ }

{
"name": "highoutput-http-server",
"version": "0.0.4",
"version": "0.0.5",
"description": "A simple HTTP server class based on koa",

@@ -39,3 +39,3 @@ "keywords": [

},
"gitHead": "2e0432fd8afafcfd1fa2994b4e3b95dd09e573aa"
"gitHead": "ba7182d9d7c205869e5c8aa8a77eeb1a19333b4a"
}

@@ -13,2 +13,3 @@ import Koa from 'koa';

type: 'jwt';
strict?: boolean;
options: {

@@ -20,2 +21,3 @@ secretKey: (() => Promise<string>) | string;

type: 'basic';
strict?: boolean;
options: {

@@ -58,3 +60,3 @@ authenticate: (

if (!ctx.headers.authorization) {
if (this.options.auth!.strict && !ctx.headers.authorization) {
invalidToken();

@@ -66,3 +68,8 @@ return;

if (!match) {
invalidToken();
if (this.options.auth!.strict) {
invalidToken();
} else {
await next();
}
return;

@@ -69,0 +76,0 @@ }

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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