-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
30 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import type { NextRequest } from 'next/server'; | ||
import { NextResponse } from 'next/server'; | ||
|
||
const text = `Disclaimer | ||
Exactly is an open source, non-custodial protocol that operates on both the Ethereum Mainnet (L1) | ||
and Optimism roll-up (L2) networks. The protocol is designed to bring fixed-income solutions for | ||
lenders and borrowers (the "Platform"). The Platform will permit its users, among other things, enter | ||
into certain transaction involving digital assets (including but not limited to digital loans and credit products) | ||
(the "Digital Assets Services"). | ||
The Platform does not allow it use by, or operates in any way with, US Persons. US Persons are prohibited | ||
from accessing and using the Digital Asset Services in any way. If Exactly has a reasonable suspicion that you | ||
are a US Person, we reserve the right to take whatever action we deem appropriate to prohibit your access to the | ||
Digital Asset Services. For purposes herein "US Person" shall mean any United States citizen or alien admitted for | ||
permanent residence in the United States, and any corporation, partnership, or other organization organized under | ||
the laws of the United States.`; | ||
|
||
export function middleware(req: NextRequest) { | ||
const country = req.geo?.country; | ||
|
||
if (country === 'US') { | ||
return new Response(text, { status: 451 }); | ||
} | ||
|
||
return NextResponse.next(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters