reconstruct web interface with react.js

This commit is contained in:
OttoMao
2015-05-19 21:19:43 +08:00
parent 157e478abb
commit d765060fff
41 changed files with 1886 additions and 17045 deletions

View File

@@ -3,7 +3,7 @@ var isRootCAFileExists = require("./certMgr.js").isRootCAFileExists(),
module.exports = {
summary:function(){
var tip = "the default rule for anyproxy, support : CORS. ";
var tip = "the default rule for anyproxy which supports CORS. ";
if(!isRootCAFileExists){
tip += "\nRoot CA does not exist, will not intercept any https requests.";
}

View File

@@ -7,7 +7,9 @@ var express = require("express"),
qrCode = require('qrcode-npm'),
util = require("./util"),
certMgr = require("./certMgr"),
logUtil = require("./log");
logUtil = require("./log"),
compress = require('compression');
function webInterface(config){
var port = config.port,
@@ -21,6 +23,7 @@ function webInterface(config){
staticDir = path.join(__dirname,'../web');
var app = express();
app.use(compress()); //invoke gzip
app.use(function(req, res, next) {
res.setHeader("note", "THIS IS A REQUEST FROM ANYPROXY WEB INTERFACE");
return next();