fix: add BackendPort configuration to support dynamic backend port setting
Some checks failed
Build and Deploy to Production / deploy (push) Has been cancelled

This commit is contained in:
2025-10-30 00:11:07 -03:00
parent f37142903a
commit d8feffe9f4
2 changed files with 3 additions and 2 deletions

View File

@@ -59,7 +59,8 @@ jobs:
"FromEmail": "${{ vars.SMTP_FROM_EMAIL }}", "FromEmail": "${{ vars.SMTP_FROM_EMAIL }}",
"ReceivingEmail": "${{ vars.YOUR_RECEIVING_EMAIL }}" "ReceivingEmail": "${{ vars.YOUR_RECEIVING_EMAIL }}"
}, },
"CorsOrigins": "${{ vars.FRONTEND_URL }}" "CorsOrigins": "${{ vars.FRONTEND_URL }}",
"BackendPort": "${{ vars.BACKEND_PORT }}"
} }
EOF EOF

View File

@@ -15,7 +15,7 @@ using System.Net;
var builder = WebApplication.CreateBuilder(args); var builder = WebApplication.CreateBuilder(args);
if (builder.Configuration["BACKEND_PORT"] is { Length: > 0 } port && ushort.TryParse(port, out _)) if (builder.Configuration["BackendPort"] is { Length: > 0 } port && ushort.TryParse(port, out _))
{ {
builder.WebHost.UseUrls($"http://0.0.0.0:{port}"); builder.WebHost.UseUrls($"http://0.0.0.0:{port}");
} }