You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -90,6 +90,7 @@ Once done, just go to <your host> and login as "admin" with <any password>.
| HOST | Url to OnLogs host from protocol to domain name. | | if `AGENT=true`
| ONLOGS_TOKEN | Token that will use an agent to authorize and connect to HOST | Generates with OnLogs interface | if `AGENT=true`
| MAX_LOGS_SIZE | Maximum allowed total logs size before cleanup triggers. Accepts human-readable formats like 5GB, 500MB, 1.5GB etc. When exceeded, 10% of logs (by count) will be removed proportionally across containers starting from oldest | 10GB | -
| DISABLE_AUTH | Option to completely disable built in authentication in the application. When this option is set to `true` the app will behave like if the Administrator is logged in. The option to manage users will be removed. | false | -
### Docket socket URL
By default the app will connect using the raw unix socket. But this can be overriden via the ENV variable `DOCKER_HOST`. That way you can specify fully qualified URL to the socket or URL of an docker socket proxy.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The reason will be displayed to describe this comment to others. Learn more.
file.Stat() and io.ReadAll(file) errors are ignored. If Stat() fails, stat will be nil and stat.ModTime() will panic; if ReadAll fails, you may serve partial/empty content without signaling an error. Please handle these errors and return an appropriate HTTP status (e.g. 500) instead of proceeding.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The reason will be displayed to describe this comment to others. Learn more.
$DISABLE_AUTH$ is not valid JavaScript syntax when this file is served without backend substitution (e.g. during local frontend dev / Vite). As written, the page will error before the app loads. Consider placing the placeholder inside a string and parsing it (or using a build-time env injection) so the script remains valid even when the placeholder is not replaced.
Suggested change
window.DISABLE_AUTH=$DISABLE_AUTH$ ?? false;
(function () {
const rawDisableAuth = '$DISABLE_AUTH$';
const value = String(rawDisableAuth).trim().toLowerCase();
const isDisabled =
value === 'true' || value === '1' || value === 'yes';
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The reason will be displayed to describe this comment to others. Learn more.
showUserMenu is derived from window.DISABLE_AUTH in a way that inverts the intended behavior: when auth is enabled (DISABLE_AUTH === false), false ?? true evaluates to false and the Users menu is hidden; when auth is disabled it becomes visible. Consider computing this as the inverse of DISABLE_AUTH (defaulting to auth enabled) so the Users menu is hidden only when auth is disabled.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
file.Stat()andio.ReadAll(file)errors are ignored. IfStat()fails,statwill be nil andstat.ModTime()will panic; ifReadAllfails, you may serve partial/empty content without signaling an error. Please handle these errors and return an appropriate HTTP status (e.g. 500) instead of proceeding.