Skip to content

Commit

Permalink
get "no auth" working again.. urgs
Browse files Browse the repository at this point in the history
  • Loading branch information
Garfonso committed Dec 15, 2023
1 parent 9228fa3 commit 8d893c3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -1251,8 +1251,6 @@ class WebServer {
return this._indexHtml;
}
const text = fs.readFileSync(getRootPath() + 'index.html').toString('utf-8');
this._indexHtml = text;
return text;
const lines = text.split('\n');
const nLines = [];
let template = false;
Expand All @@ -1275,7 +1273,9 @@ class WebServer {
hideScript.push('window.hassNoAuth = "NO_AUTH";');
hideScript.push('window.__tokenCache = {tokens: undefined, writeEnabled: false};');
}
nLines.push('<script>\n' + fs.readFileSync(__dirname + '/../assets/index.js').toString('utf-8') + hideScript.join('\n') + '\n</script>');
nLines.push('<script>\n' + hideScript.join('\n') + '\n</script>');
//deprecated.
//nLines.push('<script>\n' + fs.readFileSync(__dirname + '/../assets/index.js').toString('utf-8') + hideScript.join('\n') + '\n</script>');
}
if (template) {
continue;
Expand Down

0 comments on commit 8d893c3

Please sign in to comment.