Skip to content

Commit 21de9bd

Browse files
christ-offclaude
andcommitted
Add L_histoire_du_Québec_en_30_secondes to gone pages
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
1 parent e0dfb3e commit 21de9bd

3 files changed

Lines changed: 6 additions & 2 deletions

File tree

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ security scans, bad actors, blocked bots, and JSON/JS allowlist rejections. A
127127
gone rather than temporarily unavailable, discouraging repeated probes.
128128

129129
### gone-pages
130-
20 pages were removed from the site; a `410 Gone` tells crawlers they are permanently
130+
21 pages were removed from the site; a `410 Gone` tells crawlers they are permanently
131131
gone, where S3 would answer a plain 404. `gonePageRegex` matches the lowercased, decoded
132132
URI by its full slug, with an optional trailing slash. It runs before the bad-actor checks, so
133133
real visitors get the 410 too.

‎function.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ function isBlockedBot(normalizedUserAgent) {
165165
}
166166

167167
// rationale: README.md#gone-pages
168-
const gonePageRegex = /^\/(les-annales-du-disque-monde-le-régiment-monstrueux|les_remèdes_du_docteur_irabu_hideo_okuda|nos_premières_fois_nicolas_teyssandier|les-machines-fantômes-olivier-paquet|le-maître-et-marguerite_mikhaïl-boulgakov|les_mémoires_d_un_chat_hiro_arikawa|la-cité-du-futur-robert-charles-wilson|dans-l-oeil-du-démon_junichirô-tanizaki|le_grand_roman_des-maths_mickaël_launay|dernières-nouvelles-de-sapiens-silvana-condemi|andromède_voyager_tome_3_stephanne_desienne|le-jugement-de-jéhovah-james-morrow|mais_qui_a_attrapé_le_bison_de_higgs_david_louapre|le_japon_moderne_et_l_éthique_samouraï|carnaval_ray-celestin|l_univers_à_portée_de_main_christophe_galfard|2012-08-28-review-le-japon-vu-de-l|2013-04-12-les-chronolithes-robert-charles-wilson|2014-01-18-histoire-suisse-jean-jacques-bouquet|haïku_éric_calatraba)\/?$/;
168+
const gonePageRegex = /^\/(les-annales-du-disque-monde-le-régiment-monstrueux|les_remèdes_du_docteur_irabu_hideo_okuda|nos_premières_fois_nicolas_teyssandier|les-machines-fantômes-olivier-paquet|le-maître-et-marguerite_mikhaïl-boulgakov|les_mémoires_d_un_chat_hiro_arikawa|la-cité-du-futur-robert-charles-wilson|dans-l-oeil-du-démon_junichirô-tanizaki|le_grand_roman_des-maths_mickaël_launay|dernières-nouvelles-de-sapiens-silvana-condemi|andromède_voyager_tome_3_stephanne_desienne|le-jugement-de-jéhovah-james-morrow|mais_qui_a_attrapé_le_bison_de_higgs_david_louapre|le_japon_moderne_et_l_éthique_samouraï|carnaval_ray-celestin|l_univers_à_portée_de_main_christophe_galfard|2012-08-28-review-le-japon-vu-de-l|2013-04-12-les-chronolithes-robert-charles-wilson|2014-01-18-histoire-suisse-jean-jacques-bouquet|haïku_éric_calatraba|l_histoire_du_québec_en_30_secondes_jean-pierre_charland)\/?$/;
169169

170170
// rationale: README.md#ip-range-blocking
171171
const blockedIpRangeRegex = /^(45\.148\.10\.|93\.123\.109\.|195\.178\.110\.|213\.209\.159\.|213\.177\.179\.|62\.60\.131\.|45\.138\.12\.|185\.218\.86\.)/;

‎function.test.js‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1035,6 +1035,10 @@ describe("410 for removed pages", () => {
10351035
expect(handler(makeEvent({ uri: "/Ha%25C3%25AFku_%25C3%2589ric_Calatraba/" })).statusCode).toBe(410);
10361036
});
10371037

1038+
it("matches a double-percent-encoded accented path (Québec)", () => {
1039+
expect(handler(makeEvent({ uri: "/L_histoire_du_Qu%25C3%25A9bec_en_30_secondes_Jean-Pierre_Charland/" })).statusCode).toBe(410);
1040+
});
1041+
10381042
it("answers 410 for dated removed posts", () => {
10391043
expect(handler(makeEvent({ uri: "/2012-08-28-review-le-japon-vu-de-l/" })).statusCode).toBe(410);
10401044
});

0 commit comments

Comments
 (0)