What changed? Why?
Add Vercel Edge Middleware to enable Geo Blocking for the entire OnchainKit site.
Add restricted page.
Redirect users in a blocked region to the restricted page.
Restrict the following countries North Korea (KP), Iran (IR), Syria (SY), Cuba (CU), Crimea (UA-43), Luhansk (UA-09), Donetsk (UA-14)
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!
What changed? Why? Add Vercel Edge Middleware to enable Geo Blocking for the entire OnchainKit site.
North Korea (KP), Iran (IR), Syria (SY), Cuba (CU), Crimea (UA-43), Luhansk (UA-09), Donetsk (UA-14)
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.
Notes to reviewers
How has it been tested? Tested in dev with the US being blocked and unblocked.