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

connect-modrewrite

Package Overview
Dependencies
Maintainers
1
Versions
62
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

connect-modrewrite - npm Package Compare versions

Comparing version 0.5.11 to 0.6.0-pre

example/app.js

107

Gruntfile.js

@@ -1,5 +0,5 @@

module.exports = function(grunt) {
var urlRewrite = require('./src/modrewrite');
var jshintGlobals = require('jshint-globals');
module.exports = function(grunt) {
// Project configuration.

@@ -10,76 +10,32 @@ grunt.initConfig({

options: {
asi : true,
curly : true,
eqeqeq : true,
immed : true,
latedef : true,
newcap : true,
noarg : true,
sub : true,
undef : true,
boss : true,
eqnull : true,
browser : true,
camelcase : true,
unused : true,
node : true,
laxcomma : true
es5 : false,
strict : false,
curly : false,
eqeqeq : true,
loopfunc : true,
forin : false,
immed : true,
latedef : true,
newcap : true,
noarg : true,
sub : true,
undef : true,
boss : true,
eqnull : true,
node : true,
supernew : true,
laxbreak : true,
expr : true,
laxcomma : true,
unused : true,
latedef : false,
globals: jshintGlobals({
mocha : jshintGlobals.mocha
})
},
files: [
'index.js',
'test/**/*.js'
]
},
connect: {
server: {
options: {
port: 9001,
base: 'example',
keepalive: true,
middleware: function(connect, options) {
return [
urlRewrite([
// Test basics
'^/test$ /index.html',
'^/test/\\d*$ /index.html [L]',
// Test nocase
'^/test/nocase$ /nocase.html [NC, L]',
// Test forbidden
'^/test/forbidden$ [F]',
// Test gone
'^/test/gone$ [G]',
// Test type
'^/test/type$ /image [T=image/png, L]',
// Test Proxy
'^/test/proxy$ http://nodejs.org [P]',
// Test redirect flag
'^/test/redirect$ http://nodejs.org [R]',
'^/test/redirect-309$ http://nodejs.org [R=309]',
// Test last flag
'^/test-flag$ /connection [L]',
'^/connection$ /index.html',
// Test last flag
'^/test-flag-2$ /connection-2',
'^/connection-2$ /index.html',
// Test defined params
'^/test-defined-params/(.*)$ /$1 [L]',
// Test inverted URL
'!\\.js|\\.css$ /index.html'
]),
connect.static(options.base)
]
}
}
}
}

@@ -89,8 +45,3 @@ });

// Load plugins
grunt.loadNpmTasks('grunt-contrib-connect');
grunt.loadNpmTasks('grunt-contrib-jshint');
// Default task(s).
grunt.registerTask('default', ['jshint', 'connect']);
};
{
"name": "connect-modrewrite",
"main": "./src/modrewrite.js",
"version": "0.5.11",
"main": "./index.js",
"version": "0.6.0-pre",
"description": "connect-modrewrite adds modrewrite functionality to connect/express server",

@@ -30,7 +30,10 @@ "author": {

"devDependencies": {
"grunt-contrib-jshint": "~0.1.0",
"grunt-contrib-jshint": "^0.8.0",
"grunt": "~0.4.0",
"grunt-contrib-connect": "~0.1.0",
"chai": "~1.4.2",
"mocha": "~1.8.1"
"mocha": "~1.8.1",
"sinon": "~1.8.2",
"sinon-chai": "~2.5.0",
"proxyquire": "~0.5.2",
"jshint-globals": "~0.1.0"
},

@@ -41,8 +44,7 @@ "scripts": {

"keywords": [
"gruntplugin",
"grunt-contrib",
"grunt-contrib-connect",
"modrewrite"
],
"dependencies": {}
"dependencies": {
"express": "~3.4.8"
}
}
connect-modrewrite [![Build Status](https://travis-ci.org/tinganho/connect-modrewrite.png)](https://travis-ci.org/tinganho/connect-modrewrite)
========================
[![NPM](https://nodei.co/npm/connect-modrewrite.png?downloads=true&stars=true)](https://nodei.co/npm/connect-modrewrite/)
`connect-modrewrite` adds modrewrite functionality to connect/express server.

@@ -80,1 +83,5 @@

Licensed under the MIT license.
[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/tinganho/connect-modrewrite/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

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