Can I change the outbound Webhooks POST User-Agent string

Andy56
Shopify Partner
4 0 0

Configured the Setting > Notifications > Webhooks event to hit a specific URL on another SaaS provider to add customers via a POST.

When I test the webhook POST using RequestBin (per the Webhooks docs) I see the test post an all is happy...  When I point to the other SaaS target URL - it's a no-go.

Further testing reveals that the issue is around the Shopify header User-Agent: Ruby - the other provider does not like it.

To confirm I ran a cURL command of: 

curl -X POST -H "User-Agent: Ruby" -d "fizz=buzz" 'https://evil-SaaS-service';

Which failed to POST to the service listening at https://evil-SaaS-service...  the SaaS provider intercepts it before it can ever be processed and tosses out a lovely Weblogic error "10.4.6 405 Method Not Allowed"

Then ran this command, only changing the User-Agent string:

curl -X POST -H "User-Agent: Mozilla/5.0 (MacFaked)" -d "fizz=buzz" 'https://evil-SaaS-service';

And - ta-da - the service listening picked up the message I sent!!!

SO THE QUESTION IS - Is there any way to change the User-Agent that is used when the native Webhooks POST's an event to my target URL?

0 Likes
Andy56
Shopify Partner
4 0 0

Just a follow up here - the SaaS service I'm trying to target with the Webhook has confirmed that the User-Agent : Ruby (or really anything not "browser-ish") breaks it...  

So - I'm definitely in need of a way to change the User-Agent string on the WebHook POST out of Shopify...

0 Likes
Wolf7967
Tourist
7 0 0

Hi @Andy56 ,  I am also facing this issue and is lost. How did you resolve this issue?  

 

Thanks.

0 Likes