Skip to content

Commit b32d621

Browse files
authored
Merge pull request #337 from Resgrid/develop
Fix Twilio request validation URL scheme mismatch
2 parents 39c7d6b + b1d37fe commit b32d621

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

Web/Resgrid.Web.Services/Startup.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,11 @@ public void ConfigureServices(IServiceCollection services)
165165
{
166166
options.AuthToken = NumberProviderConfig.TwilioAuthToken;
167167
options.AllowLocal = false;
168+
// BaseUrlOverride ensures the URL used for signature validation matches
169+
// what Twilio used when signing the request, regardless of any scheme
170+
// override applied by upstream middleware (e.g. http → https rewrites).
171+
if (!string.IsNullOrWhiteSpace(Config.SystemBehaviorConfig.ResgridApiBaseUrl))
172+
options.BaseUrlOverride = Config.SystemBehaviorConfig.ResgridApiBaseUrl;
168173
});
169174

170175
services.AddApiVersioning(x =>

0 commit comments

Comments
 (0)