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:
@@ -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