-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #249 from Synthetixio/staging
Release
- Loading branch information
Showing
4 changed files
with
41 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { NextRequest } from 'next/server'; | ||
import { NextResponse, userAgent } from 'next/server'; | ||
|
||
// Set pathname were middleware will be executed | ||
export const config = { | ||
matcher: '/', | ||
}; | ||
|
||
export function middleware(req: NextRequest) { | ||
// Parse user agent | ||
const ua = userAgent(req); | ||
|
||
if ( | ||
ua.ua.includes('AdsBot-Google') || | ||
ua.ua.includes('Google-AdWords-Express') | ||
) { | ||
// Update the expected url | ||
req.nextUrl.pathname = `_phishingprotection/index.html`; | ||
|
||
// Return rewrited response | ||
return NextResponse.rewrite(req.nextUrl); | ||
} | ||
} |
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,14 @@ | ||
<html> | ||
<head> | ||
<title>PHISHING SITE</title> | ||
</head> | ||
<body> | ||
<h1 style="color: red; text-align: center">THIS IS A PHISHING SITE</h1> | ||
<p> | ||
If you are seeing this message, we <i>do not</i> use google ads. However, | ||
this website is often targeted by scammers attempting to publish phishing | ||
ads using our name. | ||
</p> | ||
<p>DO NOT APPROVE THIS AD.</p> | ||
</body> | ||
</html> |
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
789b005
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
synthetix-website – ./
synthetix-website-git-master-synthetixio.vercel.app
synthetix-website.vercel.app
synthetix-website-synthetixio.vercel.app
synthetix.io
www.synthetix.io