Skip to content

Commit 46be707

Browse files
author
Bastien Guerry
committed
src/faq-dsfr.clj: Handle /robots.txt requests to allow crawling
1 parent a7122df commit 46be707

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/faq-dsfr.clj

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -421,6 +421,11 @@
421421
:body (dsfr-page-layout
422422
"Accueil" (home-content faq-data))}
423423

424+
[:get "/robots.txt"]
425+
{:status 200
426+
:headers {"Content-Type" "text/plain"}
427+
:body "User-agent: *\nAllow: /\n"}
428+
424429
[:get "/category"]
425430
(let [category-name (:name params)
426431
category-faqs (get-faqs-by-category category-name faq-data)]

0 commit comments

Comments
 (0)