瀏覽代碼

Fix error with HTTPS (unset if false)

Joachim M. Giæver 3 年之前
父節點
當前提交
a2f4554b12
共有 1 個文件被更改,包括 8 次插入0 次删除
  1. 8 0
      src/helper/env-wrapper

+ 8 - 0
src/helper/env-wrapper

@@ -83,8 +83,16 @@ export SERVER_HOST=$(snapctl get server.host)
 export SERVER_PORT=$(snapctl get server.port)
 export SERVER_URL=$(snapctl get server.url)
 export SERVER_WS_URL=$(snapctl get server.ws-url)
+
 export GIT_DIR="${SNAP}/usr/lib/zwavejs2mqtt/.git"
 
+export HTTPS="${SERVER_SSL}"
+
+if [ "${HTTPS}" != "true" ]; then
+    unset HTTPS
+    unset SERVER_SSL
+fi
+
 export HOST="${SERVER_HOST}"
 export PORT="${SERVER_PORT}"