Separate dashboard port, first-run password setup and default trusted proxies

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
TomandClaude Opus 5.5 committed 2026-11-14 17:21:49 +01:00
1 parent a34ff96490
commit c22d452720
25 files changed
+654 -109

No files matched your search

+20 -21
View File
@@ -3,35 +3,34 @@
@attribute [AllowAnonymous]
@using Flypaper.Web.Auth
@inject AdminAuthenticator Admin
@inject NavigationManager Navigation
<PageTitle>Flypaper · Anmelden</PageTitle>
<h1 class="login-title">Flypaper</h1>
@if (!Admin.IsConfigured)
{
<div class="banner bad">
<strong>Zugang gesperrt.</strong>
Es ist kein Admin-Passwort gesetzt. Setze die Umgebungsvariable <code>Flypaper__Admin__Password</code> und starte den Container neu.
</div>
}
else
{
<form method="post" action="/auth/login" class="card form">
<AntiforgeryToken />
<input type="hidden" name="returnUrl" value="@ReturnUrl" />
<label for="password">Passwort</label>
<input id="password" name="password" type="password" autocomplete="current-password" autofocus required />
@if (Error is not null)
{
<p class="error">Passwort falsch.</p>
}
<button type="submit">Anmelden</button>
</form>
}
<form method="post" action="/auth/login" class="card form">
<AntiforgeryToken />
<input type="hidden" name="returnUrl" value="@ReturnUrl" />
<label for="password">Passwort</label>
<input id="password" name="password" type="password" autocomplete="current-password" autofocus required />
@if (Error is not null)
{
<p class="error">Passwort falsch.</p>
}
<button type="submit">Anmelden</button>
</form>
@code {
[SupplyParameterFromQuery(Name = "error")] private string? Error { get; set; }
[SupplyParameterFromQuery(Name = "returnUrl")] private string? ReturnUrl { get; set; }
protected override async Task OnInitializedAsync()
{
if (!await Admin.IsConfiguredAsync())
{
Navigation.NavigateTo("/setup");
}
}
}