Skip to content

Commit

Permalink
Release patch temporaire : Suppression chargement iframe
Browse files Browse the repository at this point in the history
  • Loading branch information
bdavidxyz authored Sep 28, 2023
1 parent d2413fa commit b63089d
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@

# CHANGELOG

## 1.20.4 (28/09/2023)

* Ucut - suppression du traffic iframe trop important grâce à un middleware

## 1.20.3 (25/09/2023)

* Ucut - petite iframe : modification CTA


## 1.20.2 (25/09/2023)

* U33b - page politique de confidentialité
Expand Down
16 changes: 16 additions & 0 deletions middleware.js
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&eacute;couvrir l'impact carbone du transport sur le climat
</a>
</div>
`,
{ status: 200, headers: { "content-type": "text/html", charset: "utf-8" } }
);
}
}

0 comments on commit b63089d

Please sign in to comment.