Commit 60efc987 authored by tywldx's avatar tywldx

fix

parent 11683258
...@@ -77,7 +77,7 @@ admin.post('/add_new_proxy', function (req, res) { ...@@ -77,7 +77,7 @@ admin.post('/add_new_proxy', function (req, res) {
let newstr = "",sourcestr; let newstr = "",sourcestr;
if( index != -1 ){ if( index != -1 ){
//存在这个配置,判断是否是原有的IP //存在这个配置,判断是否是原有的IP
var reg = new RegExp(request["namespace"] + "\\|\\d*\\.\\d*\\.\\d*\\.\\d*|\S*"); var reg = new RegExp(request["namespace"] + "\\|\\d*\\.\\d*\\.\\d*\\.\\d*\S*");
try{ try{
sourcestr = str.match(reg); sourcestr = str.match(reg);
sourcestr = sourcestr[0] sourcestr = sourcestr[0]
...@@ -121,7 +121,7 @@ admin.post('/remove_proxy', function (req, res) { ...@@ -121,7 +121,7 @@ admin.post('/remove_proxy', function (req, res) {
let request = req.body; let request = req.body;
var str = String(execSync(`cat ../ngrok/docker_env_name.sh`)).replace(/\n/,""); var str = String(execSync(`cat ../ngrok/docker_env_name.sh`)).replace(/\n/,"");
var sourcestr; var sourcestr;
var reg = new RegExp(request["namespace"] + "\\|\\d*\\.\\d*\\.\\d*\\.\\d*|\S*"); var reg = new RegExp(request["namespace"] + "\\|\\d*\\.\\d*\\.\\d*\\.\\d*\S*");
try{ try{
sourcestr = str.replace(reg,""); sourcestr = str.replace(reg,"");
}catch(e){ }catch(e){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment