Only allow display registration on local machine
This commit is contained in:
parent
7e954291ac
commit
050f887398
6
loled.js
6
loled.js
@ -8,6 +8,12 @@ let display = null;
|
||||
|
||||
router.get("/_loled/display/register", (ctx) => {
|
||||
|
||||
if(ctx.request.ip != "127.0.0.1"){
|
||||
ctx.response.status = 403
|
||||
ctx.response.body = "Only local machine is allowed to register a display"
|
||||
return;
|
||||
}
|
||||
|
||||
let name = ctx.request.url.searchParams.get("name");
|
||||
if(!name){
|
||||
name = "display-"+displayIndex
|
||||
|
Loading…
Reference in New Issue
Block a user