-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Release patch temporaire : Suppression chargement iframe
- Loading branch information
Showing
2 changed files
with
20 additions
and
1 deletion.
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 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,16 @@ | ||
import { NextResponse } from "next/server"; | ||
|
||
export function middleware(request) { | ||
if (request.nextUrl.pathname.startsWith("/iframes/transport/itineraire")) { | ||
return new NextResponse( | ||
` | ||
<div style="display: flex; justify-content: center; align-items: center; height: 100%;"> | ||
<a target="_blank" title="Impact du transport sur le climat (ouvre le site impactCO2 dans un nouvel onglet)" href="https://impactco2.fr/transport/itineraire" style="background-color: rgb(38, 130, 124); color:white; cursor:pointer; display:block; padding:1rem; border-radius:8px; text-decoration: none; text-align: center; font-family: Verdana"> | ||
Découvrir l'impact carbone du transport sur le climat | ||
</a> | ||
</div> | ||
`, | ||
{ status: 200, headers: { "content-type": "text/html", charset: "utf-8" } } | ||
); | ||
} | ||
} |