A serverless Edge Function example that intercepts the HTTP response body to inject Geolocation data into a static HTML page before it reaches the user.
This is all done at the CDN edge; there is no clientside JavaScript and no round trip to the origin server.
Check out the Demo Site
Or deploy your own copy to Netlify
This repo is part of an ongoing project I am working on exploring common use cases for serverless functions, and I welcome contributions and suggestions. Feel free to submit an issue or PR!