Some fixes
This commit is contained in:
		@@ -46,12 +46,12 @@ app.MapPut("/setip/{path}/{port}/{apiKey}", async (IYamlParser yamlParser ,HttpC
 | 
			
		||||
    return Results.Created();
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
app.MapGet("/goto/{path}", async (string path) =>
 | 
			
		||||
app.MapGet("/goto/{path}", (string path) =>
 | 
			
		||||
{
 | 
			
		||||
    var ruleExists = routes.Any(r => r.path == path);
 | 
			
		||||
    if (!ruleExists) Results.NoContent();
 | 
			
		||||
    var redirectRoute = routes.FirstOrDefault(r => r.path == path);
 | 
			
		||||
    return Results.Redirect($"http://{redirectRoute.ipAddress}:{redirectRoute.port}");
 | 
			
		||||
    return Task.FromResult(Results.Redirect($"http://{redirectRoute.ipAddress}:{redirectRoute.port}"));
 | 
			
		||||
    
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -6,14 +6,28 @@
 | 
			
		||||
        <ImplicitUsings>enable</ImplicitUsings>
 | 
			
		||||
        <NoDefaultLaunchSettingsFile>true</NoDefaultLaunchSettingsFile>
 | 
			
		||||
        <InvariantGlobalization>true</InvariantGlobalization>
 | 
			
		||||
        <PublishAot>true</PublishAot>
 | 
			
		||||
        <DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
 | 
			
		||||
 | 
			
		||||
        <!-- Publish settings -->
 | 
			
		||||
        <PublishSingleFile>true</PublishSingleFile>
 | 
			
		||||
        <SelfContained>true</SelfContained>
 | 
			
		||||
        <RuntimeIdentifier>linux-x64</RuntimeIdentifier>
 | 
			
		||||
        <PublishTrimmed>true</PublishTrimmed>
 | 
			
		||||
        <TrimMode>full</TrimMode>
 | 
			
		||||
        <EnableCompressionInSingleFile>true</EnableCompressionInSingleFile>
 | 
			
		||||
        <PublishReadyToRun>true</PublishReadyToRun>
 | 
			
		||||
        <DebugType>none</DebugType>
 | 
			
		||||
        <DebugSymbols>false</DebugSymbols>
 | 
			
		||||
        <OptimizationLevel>Release</OptimizationLevel>
 | 
			
		||||
        <TieredPGO>true</TieredPGO>
 | 
			
		||||
        <IlcOptimizationPreference>Size</IlcOptimizationPreference>
 | 
			
		||||
    </PropertyGroup>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    <ItemGroup>
 | 
			
		||||
        <PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="10.0.0-preview.6.25358.103"/>
 | 
			
		||||
        <PackageReference Include="Vecc.YamlDotNet.Analyzers.StaticGenerator" Version="16.3.0" />
 | 
			
		||||
        <PackageReference Include="YamlDotNet" Version="16.3.0" />
 | 
			
		||||
        <TrimmerRootAssembly Include="YamlDotNet"/>
 | 
			
		||||
    </ItemGroup>
 | 
			
		||||
 | 
			
		||||
    <ItemGroup>
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user