Here is what Cloudflare Workers do

  Рет қаралды 50,221

Wes Bos

Wes Bos

Күн бұрын

Пікірлер: 40
@franksonjohnson
@franksonjohnson 4 жыл бұрын
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.
@sandikodev
@sandikodev 4 жыл бұрын
owkwkwwko
@english_chat
@english_chat 4 жыл бұрын
Same here lol
@WaliBD1
@WaliBD1 3 жыл бұрын
I also thought the same way
@Chaoticaa
@Chaoticaa 3 жыл бұрын
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. 👍
@JamesQQuick
@JamesQQuick 4 жыл бұрын
Really cool and practical example. Thanks Wes!
@alvechy
@alvechy 4 жыл бұрын
For other watchers: you can use regular expressions in Workers, so the last part of finding image URL will be more readable.
@mysticaltech
@mysticaltech 4 жыл бұрын
Damn, first time I ever see such a powerful trick, Cloudflare is great, thank you and keep up the amazing work.
@kumarvishalben
@kumarvishalben 4 жыл бұрын
Moral Of The Story: use subfolder for random named stuff.
@chris-ew9wl
@chris-ew9wl 4 жыл бұрын
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.
@r-i-ch
@r-i-ch 4 жыл бұрын
"If you want to replace every instance of 'cloud' with 'butt' on a website, you could absolutely do that here." saywhatnow? 🤣😄😆
@matthealy7180
@matthealy7180 4 жыл бұрын
I didn't know Jeremy Renner could code this well!
@nick-leffler
@nick-leffler 3 жыл бұрын
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.
@heyimamaker
@heyimamaker 4 жыл бұрын
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!
@syropian
@syropian 4 жыл бұрын
Fun fact, you can also do this in Droplr by just appending a "+" to the URL :)
@heyimamaker
@heyimamaker 4 жыл бұрын
@@syropian Oh nice looks like both work.
@JosephChambers
@JosephChambers 4 жыл бұрын
Now we saw css30, and your angular ideas :) haha.
@offir711
@offir711 2 жыл бұрын
Hi Wes, why didn't you use Url Rewrite instead of a worker?
@TeeKaaY
@TeeKaaY 4 жыл бұрын
That off axis headset is killing my OCD!
@BrosZim
@BrosZim 4 жыл бұрын
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?
@WesBos
@WesBos 4 жыл бұрын
Nope - route wildcards can only be at the begin or the end of the route. Not in the middle :\
@connect-r
@connect-r 4 жыл бұрын
How to make Cookie stuffing whit cloud flare workers?
@IDOLIKIofficial
@IDOLIKIofficial 4 жыл бұрын
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!
@vitorvidal5350
@vitorvidal5350 4 жыл бұрын
"Why Wes posted a video about the work environment at Cloudflare?"
@DavidElstob73
@DavidElstob73 4 жыл бұрын
Cool video, Wes. Watched a few times now. Is it possible to intercept google analytics and append the headers?
@WesBos
@WesBos 4 жыл бұрын
I don’t think so because google analytics is on their own server
@DavidElstob73
@DavidElstob73 4 жыл бұрын
@@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.
@vanmanuk
@vanmanuk Жыл бұрын
How much would u charge me 2 put my website on me cloudfare workers for us pls
@MohamedSaleh01
@MohamedSaleh01 4 жыл бұрын
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!
@ianjamiesonmusic
@ianjamiesonmusic 2 жыл бұрын
Useful, thanks
@guacamole4876
@guacamole4876 4 жыл бұрын
Hey man, I need help trying to use cloudflare workers to get information from a website and output it
@cyrusgracias4556
@cyrusgracias4556 4 жыл бұрын
I don't get it Is this same as netlify serverless functions?
@WesBos
@WesBos 4 жыл бұрын
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
@MarkJaquith
@MarkJaquith 3 жыл бұрын
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.
@owenjeremy5384
@owenjeremy5384 4 жыл бұрын
Super Cool explanation to bad I'm not a programmer
@zzej
@zzej 4 жыл бұрын
seems like a cool way to secure your app with serverless permissions
@juniorbatista2463
@juniorbatista2463 4 жыл бұрын
That was cool
@lazarom9998
@lazarom9998 6 ай бұрын
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
@ahmezi
@ahmezi 4 жыл бұрын
const hasContentInUrl = request.url.indexOf("content") > -1
The Cloudflare Stack
13:26
Cloudflare Developers
Рет қаралды 22 М.
Introduction to Cloudflare Workers and Cloudflare Pages
14:45
Ado Kukic
Рет қаралды 43 М.
Counter-Strike 2 - Новый кс. Cтарый я
13:10
Marmok
Рет қаралды 2,8 МЛН
Маусымашар-2023 / Гала-концерт / АТУ қоштасу
1:27:35
Jaidarman OFFICIAL / JCI
Рет қаралды 390 М.
I'm now VPS red pilled (and protecting with CloudFlare)
8:12
Web Dev Cody
Рет қаралды 47 М.
AI Hackathon - Cloudflare Workers AI - Getting started
17:06
Cloudflare Developers
Рет қаралды 2,1 М.
What is DNS? (and how it makes the Internet work)
24:22
NetworkChuck
Рет қаралды 299 М.
How is this Website so fast!?
13:39
Wes Bos
Рет қаралды 1,3 МЛН
Cloudflare Tunnels: Restrict Access with Google and Github
22:06
Using Llama 3 in n8n with Cloudflare Workers AI
4:34
Oskar
Рет қаралды 4,2 М.