We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ddd2c6e commit be3b05dCopy full SHA for be3b05d
src/subscribe-dsfr.clj
@@ -1022,6 +1022,11 @@
1022
:headers {"Content-Type" "application/json; charset=UTF-8"}
1023
:body (json/generate-string debug-info {:pretty true})}))
1024
1025
+(defn handle-robots-txt []
1026
+ {:status 200
1027
+ :headers {"Content-Type" "text/plain; charset=UTF-8"}
1028
+ :body "User-agent: *\nDisallow: /"})
1029
+
1030
;; Main app with routes
1031
(defn app [req]
1032
(let [uri (:uri req)
@@ -1035,6 +1040,7 @@
1035
1040
[:get "/"] (handle-index req-with-params)
1036
1041
[:post "/subscribe"] (handle-subscribe req-with-params)
1037
1042
[:get "/debug"] (handle-debug req-with-params)
1043
+ [:get "/robots.txt"] (handle-robots-txt)
1038
1044
(do
1039
1045
(log/info "Not found:" (:request-method req) uri)
1046
{:status 404
0 commit comments