coinbase / onchainkit

React components and TypeScript utilities to help you build top-tier onchain apps.
https://onchainkit.xyz
MIT License
538 stars 128 forks source link

feat: Enable Geo Blocking for restricted territories #614

Closed cpcramer closed 3 months ago

cpcramer commented 3 months ago

What changed? Why? Add Vercel Edge Middleware to enable Geo Blocking for the entire OnchainKit site.

Edge Middleware is code that executes before a request is processed on a site. We can further update our middleware to execute custom logic, rewrite, redirect, add headers and more, before returning a response!

API Reference.

Screenshot 2024-06-18 at 1 08 02 PM

Notes to reviewers

How has it been tested? Tested in dev with the US being blocked and unblocked.