Skip to content

Commit

Permalink
feat: add geo restrictions
Browse files Browse the repository at this point in the history
  • Loading branch information
edd committed Oct 25, 2023
1 parent 5602fed commit dc74a11
Show file tree
Hide file tree
Showing 2 changed files with 85 additions and 0 deletions.
25 changes: 25 additions & 0 deletions src/pages/restricted/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import * as React from 'react'
import CrossLarge from '../../components/Svg/CrossLarge'

const RestrictedPage = () => {
return (
<div className="min-h-screen w-full bg-white bg-four-oh-four pb-[5rem]">
<div className="mx-auto flex w-full max-w-[68.75rem] flex-col py-[10%] px-4 md:px-8">
<div className="w-full max-w-[41.25rem] self-end border-[3px] border-black bg-white text-black">
<div className="flex h-[2rem] flex-col items-end justify-center border-b-[3px] border-black pr-1">
<CrossLarge />
</div>
<div className="p-[1.875rem]">
<p className="title-xs mb-2 font-[AlphaLyrae] text-black">
Due to uncertainty about the legal and regulatory status of the
content hosted on this site, it is not available to visitors in
your jurisdiction.
</p>
</div>
</div>
</div>
</div>
)
}

export default RestrictedPage
60 changes: 60 additions & 0 deletions vercel.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,66 @@
}
},
"redirects": [
{
"source": "/:path((?!restricted|assets).*)",
"has": [
{
"type": "header",
"key": "x-vercel-ip-country",
"value": "US"
}
],
"permanent": false,
"destination": "/restricted"
},
{
"source": "/:path((?!restricted|assets).*)",
"has": [
{
"type": "header",
"key": "x-vercel-ip-country",
"value": "CU"
}
],
"permanent": false,
"destination": "/restricted"
},
{
"source": "/:path((?!restricted|assets).*)",
"has": [
{
"type": "header",
"key": "x-vercel-ip-country",
"value": "KP"
}
],
"permanent": false,
"destination": "/restricted"
},
{
"source": "/:path((?!restricted|assets).*)",
"has": [
{
"type": "header",
"key": "x-vercel-ip-country",
"value": "IR"
}
],
"permanent": false,
"destination": "/restricted"
},
{
"source": "/:path((?!restricted).*)",
"has": [
{
"type": "header",
"key": "x-vercel-ip-country",
"value": "SY"
}
],
"permanent": false,
"destination": "/restricted"
},
{
"source": "/discord",
"destination": "https://discord.gg/3hQyGgZ"
Expand Down

0 comments on commit dc74a11

Please sign in to comment.