Using the "move line" keyboard shortcut in VS Code to animate a diagram of how service workers work is one of my favorite dev youtube moments in months 😂 just wonderful.
While my use-case for CF workers if pretty different from yours, I feel like you found an incredible use-case to really show the power of this platform. Short video, but answers everything I needed to know to confirm that this is exactly the platform I was looking for. Thanks for the great video. 👍
Lol, I use Droplr and for fun, just tried adding /content.jpg and now I can hotlink the screenshots. So in a roundabout way, thanks for showing me that :) Also, the workers look really cool!
Wes, it's not a nodejs script, It's Javascript using the Workers API. They run via Isolates which is a lighter construct compared to node running in a VM.
Remember also by enabling that orange cloud limits your max_upload_size to 100MB. Looks like you use mainly pictures so nothing to worry about, but keep that in mind.
Very cool! Another cool thing you could do is to redirect wes.io to wesbos.com (and properly set the referrer) because I think that wes.io is a pretty cool domain name!
@@WesBos yeah I thought that was stretching my luck. :) Self-hosting the main script it easy enough, it's the tracking pixel's expires header that I'm trying to append.
Great content Wes! One question though -- To stop unnecessary request couldn't you put the route of the worker to *wes.io/*/content ? And that way you also don't have to check for forwarding request without /content? Cheers!
I came here from googling "what is cloudflare workers" trying to find a 1 or 2 min video explaining it. Instead I got this loosy 23 min talk, and I'm tired of that bullshit, looking for a youtuber that knows to summarize
Very similar, the only difference is that this runs before the DNS resolution which allows me to run serverless functions on a domain which points to a server I don't control
They can do serverless stuff (just return a new Response object), but they can also operate as a really powerful proxy, that runs cheaply on every one of Cloudflare's edge servers. For instance, you could have a static website and use this to inject dynamic content.
Using the "move line" keyboard shortcut in VS Code to animate a diagram of how service workers work is one of my favorite dev youtube moments in months 😂 just wonderful.
owkwkwwko
Same here lol
I also thought the same way
While my use-case for CF workers if pretty different from yours, I feel like you found an incredible use-case to really show the power of this platform. Short video, but answers everything I needed to know to confirm that this is exactly the platform I was looking for. Thanks for the great video. 👍
Really cool and practical example. Thanks Wes!
Damn, first time I ever see such a powerful trick, Cloudflare is great, thank you and keep up the amazing work.
For other watchers: you can use regular expressions in Workers, so the last part of finding image URL will be more readable.
Moral Of The Story:
use subfolder for random named stuff.
"If you want to replace every instance of 'cloud' with 'butt' on a website, you could absolutely do that here."
saywhatnow? 🤣😄😆
Lol, I use Droplr and for fun, just tried adding /content.jpg and now I can hotlink the screenshots.
So in a roundabout way, thanks for showing me that :)
Also, the workers look really cool!
Fun fact, you can also do this in Droplr by just appending a "+" to the URL :)
@@syropian Oh nice looks like both work.
Now we saw css30, and your angular ideas :) haha.
Wes, it's not a nodejs script, It's Javascript using the Workers API. They run via Isolates which is a lighter construct compared to node running in a VM.
I didn't know Jeremy Renner could code this well!
That off axis headset is killing my OCD!
Remember also by enabling that orange cloud limits your max_upload_size to 100MB. Looks like you use mainly pictures so nothing to worry about, but keep that in mind.
Very cool! Another cool thing you could do is to redirect wes.io to wesbos.com (and properly set the referrer) because I think that wes.io is a pretty cool domain name!
Useful, thanks
Hi Wes, why didn't you use Url Rewrite instead of a worker?
Cool video, Wes. Watched a few times now.
Is it possible to intercept google analytics and append the headers?
I don’t think so because google analytics is on their own server
@@WesBos yeah I thought that was stretching my luck. :) Self-hosting the main script it easy enough, it's the tracking pixel's expires header that I'm trying to append.
How to make Cookie stuffing whit cloud flare workers?
Could you set the route for the worker to *wes.io/*/content* so that it is only used for the image requests and not the page requests?
Nope - route wildcards can only be at the begin or the end of the route. Not in the middle :\
Great content Wes! One question though -- To stop unnecessary request couldn't you put the route of the worker to *wes.io/*/content ? And that way you also don't have to check for forwarding request without /content? Cheers!
"Why Wes posted a video about the work environment at Cloudflare?"
That was cool
How much would u charge me 2 put my website on me cloudfare workers for us pls
seems like a cool way to secure your app with serverless permissions
Hey man, I need help trying to use cloudflare workers to get information from a website and output it
I came here from googling "what is cloudflare workers" trying to find a 1 or 2 min video explaining it. Instead I got this loosy 23 min talk, and I'm tired of that bullshit, looking for a youtuber that knows to summarize
const hasContentInUrl = request.url.indexOf("content") > -1
I don't get it
Is this same as netlify serverless functions?
Very similar, the only difference is that this runs before the DNS resolution which allows me to run serverless functions on a domain which points to a server I don't control
They can do serverless stuff (just return a new Response object), but they can also operate as a really powerful proxy, that runs cheaply on every one of Cloudflare's edge servers. For instance, you could have a static website and use this to inject dynamic content.