Commit f0a1fdb9 authored by Ralf's avatar Ralf
Browse files

add a whitelist for nodes to switch (for experimentation)

parent 1780043a
...@@ -28,6 +28,9 @@ const regions = { ...@@ -28,6 +28,9 @@ const regions = {
switch_time: -1, switch_time: -1,
}, },
} }
const switch_nodes = [ // only these node IDs will be switched
"525400280bbb",
]
const http = require("http") const http = require("http")
const fs = require("fs") const fs = require("fs")
...@@ -69,7 +72,7 @@ const server = http.createServer(async (req, res) => { ...@@ -69,7 +72,7 @@ const server = http.createServer(async (req, res) => {
result.node_information.region = nodeinfo[result.node_information.id].meta.region result.node_information.region = nodeinfo[result.node_information.id].meta.region
} }
} }
if (result.node_information.region) { if (switch_nodes.indexOf(result.node_information.id) >= 0 && result.node_information.region) {
const region_info = regions[result.node_information.region] const region_info = regions[result.node_information.region]
if (region_info) { if (region_info) {
result.node_information.domain.name = region_info.domain result.node_information.domain.name = region_info.domain
......
Supports Markdown
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