3 ms·
> I'm having a hard time conceptualizing what kind of logic you would run on these edge functions? Two use cases: 1) Routing Facebook and Twitter to a pre-ren
by Alex3917 10y ago
> I'm having a hard time conceptualizing what kind of logic you would run on these edge functions?
Two use cases:
1) Routing Facebook and Twitter to a pre-rendered version of your single page app based on their user agents.
2) Adding custom headers to your responses, e.g. for a Content Security Policy.
There is no good way to do either of those things currently. You could have one off options for each of those and the 50 other common use cases, but this is actually a really elegant solution. Very well done.
- jensvdh 10y agoWould you be able to route facebook/google to a pre-rendered version of your app without sending it a 301 redirect though?