From 9d073b3ab2cc79b342a0e251692bef99411884a8 Mon Sep 17 00:00:00 2001 From: Dominic Hock Date: Fri, 28 Apr 2023 12:42:07 +0200 Subject: [PATCH] fix: missing env var for ip banlist Fixes #25 --- .idea/GitLink.xml | 6 ++++++ Dockerfile | 2 ++ src/main.ts | 1 + 3 files changed, 9 insertions(+) create mode 100644 .idea/GitLink.xml diff --git a/.idea/GitLink.xml b/.idea/GitLink.xml new file mode 100644 index 0000000..009597c --- /dev/null +++ b/.idea/GitLink.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 0f0b009..7be9ad9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,6 +8,8 @@ ENV MATTERMOST_CHANNEL_ID="" ENV SPACE_URL="" ENV SPACE_PROJECT_ID="" ENV AUTHORIZATION_TOKEN="" +ENV REPORT_UNAUTHORIZED="true" +ENV IP_BANLIST_FILE="ip_banlist.json" WORKDIR /usr/src/app diff --git a/src/main.ts b/src/main.ts index de9eceb..2be8bb3 100644 --- a/src/main.ts +++ b/src/main.ts @@ -130,6 +130,7 @@ function createServer() { } catch (e) { console.log(e); + mattermostApi.CreateMessage(process.env.MATTERMOST_CHANNEL_ID, "Uncaught exception: " + e); res.writeHead(500, {'Content-Type': 'text/plain'}); res.write("Error: " + e + "\n\n" + body + "\n\n"); res.end();