Skip to content

Commit 2da5497

Browse files
committed
Improve reverse proxy example port config.
1 parent 16908e1 commit 2da5497

6 files changed

Lines changed: 10 additions & 27 deletions

File tree

examples/Aspire.AppHost/Examples.Aspire.AppHost.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<IsAspireHost>true</IsAspireHost>
99
<GenerateDocumentationFile>true</GenerateDocumentationFile>
1010
</PropertyGroup>
11-
11+
1212
<ItemGroup>
1313
<PackageReference Include="Aspire.Hosting.AppHost" Version="9.3.1" />
1414
</ItemGroup>

examples/Aspire.AppHost/Program.cs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,19 @@
55

66
// Add example website.
77
var website = builder.AddProject<Examples_Aspire_Website>("Website", options =>
8-
{
9-
// Do not use endpoint configuration found in the Website project. We let aspire set up everything.
10-
options.ExcludeLaunchProfile = true;
11-
options.ExcludeKestrelEndpoints = true;
12-
})
8+
{
9+
// Do not use endpoint configuration found in the Website project. We let aspire set up everything.
10+
options.ExcludeLaunchProfile = true;
11+
options.ExcludeKestrelEndpoints = true;
12+
})
1313
// Add a HTTP endpoint. The reverse proxy will set up a secure HTTPS endpoint for you to connect to this resource.
1414
.WithHttpEndpoint();
1515

1616
// Add reverse proxy website.
1717
var reverseProxy = builder
1818
.AddProject<Examples_Aspire_ReverseProxy>("Reverse-Proxy")
19+
// Configure reverse proxy to use https on port 443.
20+
.WithHttpsEndpoint(443)
1921
// Map a host name to the endpoint of the example website.
2022
.WithReverseProxyReference("Website", website.GetEndpoint("http"), "example-website.local");
2123

examples/Aspire.ReverseProxy/Examples.Aspire.ReverseProxy.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
<PropertyGroup>
44
<TargetFramework>net9.0</TargetFramework>
55
<GenerateDocumentationFile>true</GenerateDocumentationFile>
6+
<NoDefaultLaunchSettingsFile>true</NoDefaultLaunchSettingsFile>
67
</PropertyGroup>
78

89
<ItemGroup>

examples/Aspire.ReverseProxy/Properties/launchSettings.json

Lines changed: 0 additions & 9 deletions
This file was deleted.

examples/Aspire.Website/Examples.Aspire.Website.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
<PropertyGroup>
44
<TargetFramework>net9.0</TargetFramework>
55
<GenerateDocumentationFile>true</GenerateDocumentationFile>
6+
<NoDefaultLaunchSettingsFile>true</NoDefaultLaunchSettingsFile>
67
</PropertyGroup>
78

89
<ItemGroup>

examples/Aspire.Website/Properties/launchSettings.json

Lines changed: 0 additions & 12 deletions
This file was deleted.

0 commit comments

Comments
 (0)