mirror of
https://github.com/ZeroTier/ZeroTierOne
synced 2025-07-15 01:23:14 -07:00
Bunch more control plane work, and shelve old UI -- React FTW.
This commit is contained in:
parent
a2605561af
commit
1cfa67bbdd
43 changed files with 233 additions and 120 deletions
|
@ -189,7 +189,7 @@ public:
|
|||
if (_master)
|
||||
_node->setNetconfMaster((void *)_master);
|
||||
|
||||
_controlPlane = new ControlPlane(_node,std::set<std::string>());
|
||||
_controlPlane = new ControlPlane(_node);
|
||||
|
||||
_nextBackgroundTaskDeadline = 0;
|
||||
for(;;) {
|
||||
|
@ -454,16 +454,12 @@ public:
|
|||
std::string contentType("text/plain"); // default if not changed in handleRequest()
|
||||
unsigned int scode = 404;
|
||||
|
||||
if ((htc->from.ipsEqual(InetAddress::LO4))||(htc->from.ipsEqual(InetAddress::LO6))) {
|
||||
try {
|
||||
if (_controlPlane)
|
||||
scode = _controlPlane->handleRequest(htc->parser.method,htc->url,htc->headers,htc->body,data,contentType);
|
||||
} catch ( ... ) {
|
||||
scode = 500;
|
||||
}
|
||||
} else {
|
||||
scode = 403;
|
||||
htc->shouldKeepAlive = false;
|
||||
try {
|
||||
if (_controlPlane)
|
||||
scode = _controlPlane->handleRequest(htc->from,htc->parser.method,htc->url,htc->headers,htc->body,data,contentType);
|
||||
else scode = 500;
|
||||
} catch ( ... ) {
|
||||
scode = 500;
|
||||
}
|
||||
|
||||
const char *scodestr;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue