Open brettsam opened 5 months ago
Looks like this was added 6 years ago in this commit by @balag0 - he may help provide more context on this.
Looking in the older Kudu code here that also does an /operations/settriggers, it handles this in a different way, via HttpClient configuration. I wonder if we shouldn't just do the same thing in the host.
If a customer has these two settings...
SCM_SKIP_SSL_VALIDATION
=1
...the functions host will attempt to make an
http
request to SyncTriggers. This will fail with a 404.It ends up being a 404 because the request follows the following path:
POST
(with payload) issued tohttp://{sitename}/operations/settriggers
301 MovedPermanently
-- which the HttpClient follows this -- which becomes https -- and turns from a POST into a GET while dropping the payload. I never knew this happened, but context:There's several investigations we can make here:
AllowAutomaticRedirect
in the HttpClient, handle the 301 directly, and present a nice error to the customer. Or use DiagnosticEvents, etc -- but provide guidance on how to get SyncTriggers working again.