Can snippets be configured to run before cache for user authentication
I have a bunch of cache and only want authenticated users to be able to use it. If i can run snippets before serving cache i would be able to authenticate then and then serve cache or block them
3 Replies
So that means i can do this right
š thanks for letting me know
Hi sorry for the necro, was taking a look at docs again since i am starting to build my app now
and it says that snippets run after cache rules
https://developers.cloudflare.com/rules/snippets/#execution-order
Cloudflare Docs
Snippets | Cloudflare Rules docs
Cloudflare Snippets (alpha) provide a powerful and flexible way to customize the behavior of your website or application using short pieces of JavaScript code. With Snippets, you can modify HTTP response headers, implement JWT validation, perform complex redirects, and much more.
oh....
i get it now, thank you so much!