summaryrefslogtreecommitdiffstats
path: root/robot.go
diff options
context:
space:
mode:
authorMarc Pervaz Boocha <mboocha@sudomsg.com>2025-08-02 22:23:13 +0530
committerMarc Pervaz Boocha <mboocha@sudomsg.com>2025-08-02 23:02:30 +0530
commit178e0bfc2d8709ae4d3abd7519b260df09b2d3b5 (patch)
tree10cbdd013c62586190074d9f088e2269f88c4cab /robot.go
parentFixed Broken .gitignore (diff)
downloadgopkgserver-0.1.0.tar
gopkgserver-0.1.0.tar.gz
gopkgserver-0.1.0.tar.bz2
gopkgserver-0.1.0.tar.lz
gopkgserver-0.1.0.tar.xz
gopkgserver-0.1.0.tar.zst
gopkgserver-0.1.0.zip
Switched to go.sudomsg.com/kitHEADv0.1.0main
Diffstat (limited to '')
-rw-r--r--robot.go17
1 files changed, 17 insertions, 0 deletions
diff --git a/robot.go b/robot.go
new file mode 100644
index 0000000..7426eda
--- /dev/null
+++ b/robot.go
@@ -0,0 +1,17 @@
+package gopkgserver
+
+import (
+ "io"
+ "net/http"
+)
+
+func Robot() http.HandlerFunc {
+ robots := `User-agent: *
+Disallow: /
+`
+ return func(w http.ResponseWriter, r *http.Request) {
+ w.Header().Set("Cache-Control", "public, max-age=86400, immutable")
+ w.Header().Set("Content-Type", "text/plain")
+ io.WriteString(w, robots)
+ }
+}