Knock Knock, who's there? It's the Captain
Captain who? Shopify-Captain-Hook,
I have a delivery for you.
I just had a long day of meetings, the kids have gone to bed and I finally got to sit down and do some coding.
Thats when I saw something that put a huge smile on my face!
I was putting together a service written in Go that would receive Shopify webhook notifications, validate and send them to a marketing automation application. When working on getting the HMAC verification in place I took a closer look on the headers that Shopify was sending to me.
Not sure if you know but Shopify’s founder Tobi Lutke has said that “Shopify is arming the rebels”, empowering entrepreneurs to launch an online business. It’s nice to see that this mindset is implemented all the way down into their webhook notification service.
Checkout what the User-Agent is set to in the log message below
{"time":"2020-12-16T14:11:21.0046+01:00","id":"","remote_ip":"34.75.113.***","host":"********.eu.ngrok.io",
"method":"POST","uri":"/shopify/webhook","user_agent":"Shopify-Captain-Hook","status":200,"error":"",
"latency":11401606,"latency_human":"11.401606ms","bytes_in":8213,"bytes_out":60}
The User-Agent is set to Shopify-Captain-Hook
🤓
Well done Shopify, well done.
I give this 🌮🌮🌮🌮🌮 out of 5, it’s just so subtle and at the same time brilliant.
Have you seen any interesting “easter eggs” that you want others to know about? Just reach out to hello@tigersandtacos.dev and we will add it to the website.