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

appserver

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

appserver - npm Package Compare versions

Comparing version 0.3.1 to 0.4.0

8

lib/middleware/localfiles.js

@@ -15,9 +15,13 @@ 'use strict';

function create(options) {
var verbose = options.verbose;
var prefixes = options.prefixes;
var index = options.index || 'core'; // without leading slash
return function (request, response, next) {
if ('GET' != request.method && 'HEAD' != request.method) {
return next();
}
var pathname = url.parse(request.url).pathname,

@@ -37,3 +41,3 @@ filename,

pathname = pathname.replace(/^\/v=[^\/]+\//, '/');
pathname = pathname.replace(/^\/$/, '/core');
pathname = pathname.replace(/^\/$/, '/' + index);
filename = prefixes.map(function (p) {

@@ -51,3 +55,3 @@ return path.join(p, pathname);

var stream = fs.createReadStream(filename);
if (pathname === '/core' || pathname === '/signin') {
if (pathname === '/ui' || pathname === '/core' || pathname === '/signin') {
type = 'text/html';

@@ -54,0 +58,0 @@ var replaceVersion = require('../replace_version').createReplaceStream(prefixes);

{
"name": "appserver",
"version": "0.3.1",
"version": "0.4.0",
"description": "A connect based middleware to support local development against a remote backend.",

@@ -5,0 +5,0 @@ "main": "./lib/appserver",

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