mirror of
https://github.com/alibaba/anyproxy.git
synced 2025-08-04 21:39:04 +00:00
reconstruct web interface with react.js
This commit is contained in:
@@ -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.";
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user