Update HTTP configuration to use 'Hosting' settings

Changed the binding of HTTP options to 'Hosting' settings in Program.cs to ensure consistent configuration across the application. Removed redundant 'Http' configuration section from appsettings.json.
This commit is contained in:
Sipke Schoorstra 2024-09-06 19:06:59 +02:00
parent 83a8de6aae
commit 0827df7d33
2 changed files with 2 additions and 6 deletions

View file

@ -100,7 +100,7 @@ services
if (useCaching)
http.UseCache();
http.ConfigureHttpOptions = options => configuration.GetSection("Http").Bind(options);
http.ConfigureHttpOptions = options => configuration.GetSection("Hosting").Bind(options);
})
.UseEmail(email => email.ConfigureOptions = options => configuration.GetSection("Smtp").Bind(options))
.UseWebhooks(webhooks => webhooks.ConfigureSinks = options => builder.Configuration.GetSection("Webhooks:Sinks").Bind(options))

View file

@ -19,7 +19,7 @@
},
"Hosting": {
"BaseUrl": "https://localhost:8080",
"BasePath": ""
"BasePath": "/api/workflows"
},
"Identity": {
"Tokens": {
@ -81,10 +81,6 @@
"Port": 2525,
"DefaultSender": "noreply@crmservices.com"
},
"Http": {
"BaseUrl": "https://localhost:5001",
"BasePath": "/api/workflows"
},
"Webhooks": {
"Sinks": []
},