diff --git a/loled.js b/loled.js index 15a4a7b..76d6c4a 100755 --- a/loled.js +++ b/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