Standardport für WebUI von 5001 auf 6001 geändert
This commit is contained in:
@@ -81,7 +81,7 @@
|
|||||||
<StackPanel Spacing="12">
|
<StackPanel Spacing="12">
|
||||||
<TextBlock Text="Server-Status" FontWeight="SemiBold" FontSize="14" />
|
<TextBlock Text="Server-Status" FontWeight="SemiBold" FontSize="14" />
|
||||||
<TextBlock Name="lblWebUiStatus" Text="Status wird ermittelt …" Foreground="{DynamicResource AppAccentBrush}" />
|
<TextBlock Name="lblWebUiStatus" Text="Status wird ermittelt …" Foreground="{DynamicResource AppAccentBrush}" />
|
||||||
<TextBlock Name="lblWebUiUrl" Text="http://127.0.0.1:5001" Foreground="{DynamicResource AppMutedTextBrush}" FontSize="12" />
|
<TextBlock Name="lblWebUiUrl" Text="http://127.0.0.1:6001" Foreground="{DynamicResource AppMutedTextBrush}" FontSize="12" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Border>
|
</Border>
|
||||||
|
|
||||||
@@ -93,7 +93,7 @@
|
|||||||
|
|
||||||
<Grid ColumnDefinitions="140,*" Margin="0,4">
|
<Grid ColumnDefinitions="140,*" Margin="0,4">
|
||||||
<TextBlock Grid.Column="0" Text="Port:" VerticalAlignment="Center" />
|
<TextBlock Grid.Column="0" Text="Port:" VerticalAlignment="Center" />
|
||||||
<NumericUpDown Name="numWebUiPort" Grid.Column="1" Minimum="1024" Maximum="65535" Value="5001" Width="150" HorizontalAlignment="Left" />
|
<NumericUpDown Name="numWebUiPort" Grid.Column="1" Minimum="1024" Maximum="65535" Value="6001" Width="150" HorizontalAlignment="Left" />
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
<CheckBox Name="chkWebUiLocalOnly" Content="Nur lokaler Zugriff (127.0.0.1)" />
|
<CheckBox Name="chkWebUiLocalOnly" Content="Nur lokaler Zugriff (127.0.0.1)" />
|
||||||
|
|||||||
@@ -510,7 +510,7 @@ namespace PolyTrader.App.Avalonia.Views
|
|||||||
var txtToken = this.FindControl<TextBox>("txtWebUiToken")!;
|
var txtToken = this.FindControl<TextBox>("txtWebUiToken")!;
|
||||||
|
|
||||||
_webOptions.Enabled = chkEnabled.IsChecked ?? true;
|
_webOptions.Enabled = chkEnabled.IsChecked ?? true;
|
||||||
_webOptions.Port = (int)(numPort.Value ?? 5001);
|
_webOptions.Port = (int)(numPort.Value ?? 6001);
|
||||||
_webOptions.LocalOnly = chkLocal.IsChecked ?? true;
|
_webOptions.LocalOnly = chkLocal.IsChecked ?? true;
|
||||||
_webOptions.AuthToken = txtToken.Text?.Trim() ?? string.Empty;
|
_webOptions.AuthToken = txtToken.Text?.Trim() ?? string.Empty;
|
||||||
|
|
||||||
|
|||||||
@@ -25,9 +25,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"WebUi": {
|
"WebUi": {
|
||||||
"_comment": "Port (Standard 5001), LocalOnly (Standard true = nur 127.0.0.1). AuthToken liegt in appsettings.Local.json.",
|
"_comment": "Port (Standard 6001), LocalOnly (Standard true = nur 127.0.0.1). AuthToken liegt in appsettings.Local.json.",
|
||||||
"Enabled": true,
|
"Enabled": true,
|
||||||
"Port": 5001,
|
"Port": 6001,
|
||||||
"LocalOnly": true,
|
"LocalOnly": true,
|
||||||
"AuthToken": ""
|
"AuthToken": ""
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,9 +15,9 @@ namespace PolyTrader.Web.Configuration
|
|||||||
public bool Enabled { get; set; } = true;
|
public bool Enabled { get; set; } = true;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Port, auf dem Kestrel lauscht (Standard: 5001).
|
/// Port, auf dem Kestrel lauscht (Standard: 6001).
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public int Port { get; set; } = 5001;
|
public int Port { get; set; } = 6001;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Wenn true, bindet Kestrel nur an Loopback (127.0.0.1 / localhost).
|
/// Wenn true, bindet Kestrel nur an Loopback (127.0.0.1 / localhost).
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ namespace PolyTrader.Web.Endpoints
|
|||||||
{
|
{
|
||||||
var opt = optionsProvider.Value;
|
var opt = optionsProvider.Value;
|
||||||
opt.Enabled = req.Enabled;
|
opt.Enabled = req.Enabled;
|
||||||
opt.Port = req.Port > 0 && req.Port <= 65535 ? req.Port : 5001;
|
opt.Port = req.Port > 0 && req.Port <= 65535 ? req.Port : 6001;
|
||||||
opt.LocalOnly = req.LocalOnly;
|
opt.LocalOnly = req.LocalOnly;
|
||||||
if (req.AuthToken != null)
|
if (req.AuthToken != null)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -190,7 +190,7 @@
|
|||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<label for="cfgPort">Server-Port</label>
|
<label for="cfgPort">Server-Port</label>
|
||||||
<input type="number" id="cfgPort" class="form-input" min="1024" max="65535" required>
|
<input type="number" id="cfgPort" class="form-input" min="1024" max="65535" required>
|
||||||
<div class="form-desc">Standard ist 5001. Änderung wird nach dem nächsten Neustart aktiv.</div>
|
<div class="form-desc">Standard ist 6001. Änderung wird nach dem nächsten Neustart aktiv.</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ namespace PolyTrader.Tests.WebUi
|
|||||||
var options = new WebUiOptions
|
var options = new WebUiOptions
|
||||||
{
|
{
|
||||||
Enabled = true,
|
Enabled = true,
|
||||||
Port = 5001,
|
Port = 6001,
|
||||||
LocalOnly = false,
|
LocalOnly = false,
|
||||||
AuthToken = "test-token-xyz"
|
AuthToken = "test-token-xyz"
|
||||||
};
|
};
|
||||||
@@ -58,7 +58,7 @@ namespace PolyTrader.Tests.WebUi
|
|||||||
var webNode = node["WebUi"]?.AsObject();
|
var webNode = node["WebUi"]?.AsObject();
|
||||||
Assert.NotNull(webNode);
|
Assert.NotNull(webNode);
|
||||||
Assert.True(webNode["Enabled"]?.GetValue<bool>());
|
Assert.True(webNode["Enabled"]?.GetValue<bool>());
|
||||||
Assert.Equal(5001, webNode["Port"]?.GetValue<int>());
|
Assert.Equal(6001, webNode["Port"]?.GetValue<int>());
|
||||||
Assert.False(webNode["LocalOnly"]?.GetValue<bool>());
|
Assert.False(webNode["LocalOnly"]?.GetValue<bool>());
|
||||||
Assert.Equal("test-token-xyz", webNode["AuthToken"]?.GetValue<string>());
|
Assert.Equal("test-token-xyz", webNode["AuthToken"]?.GetValue<string>());
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user