Created
December 18, 2011 17:55
-
-
Save alejandro/1494041 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var express = require('express') | |
var app = exports.app = express.createServer(); | |
var fusker = require('fusker'); | |
fusker.config.dir = process.cwd(); | |
fusker.config.banLength = 1; | |
fusker.config.verbose = true; | |
fusker.http.detect('csrf', 'xss', 'sqli', 'lfi', '404'); | |
fusker.http.punish('blacklist', 'bush'); | |
fusker.socket.detect('xss', 'sqli', 'lfi'); | |
fusker.socket.punish('blacklist'); | |
app.configure(function() { | |
app.use(fusker.express.check); | |
//... | |
}); | |
//... | |
app.all('/*', detectMobile, function(req, res, next) { //Line 468 <- throw error about PUSH | |
res.header("Access-Control-Allow-Origin", "*"); | |
res.header("Access-Control-Allow-Headers", "X-Requested-With"); | |
res.header('Strict-Transport-Security', 'max-age=31556926; includeSubDomains'); | |
next(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment