summaryrefslogtreecommitdiff
path: root/vendor/github.com/go-chi/chi/v5/pattern.go
diff options
context:
space:
mode:
authorFelix Hanley <felix@userspace.com.au>2025-08-28 01:38:06 +0000
committerFelix Hanley <felix@userspace.com.au>2025-08-28 01:38:06 +0000
commit02e6f97cd04cbcd7505e1da9a781df4321463640 (patch)
tree08d3d2317cdab4885d7c9830ed7983fecfb9fb4a /vendor/github.com/go-chi/chi/v5/pattern.go
parentfaa33e32b5e967fdfeac96bfc39ed3d94f9514ac (diff)
downloadcaddy-02e6f97cd04cbcd7505e1da9a781df4321463640.tar.gz
caddy-02e6f97cd04cbcd7505e1da9a781df4321463640.tar.bz2
Attempt to stop AI bots using Anubis
Diffstat (limited to 'vendor/github.com/go-chi/chi/v5/pattern.go')
-rw-r--r--vendor/github.com/go-chi/chi/v5/pattern.go16
1 files changed, 16 insertions, 0 deletions
diff --git a/vendor/github.com/go-chi/chi/v5/pattern.go b/vendor/github.com/go-chi/chi/v5/pattern.go
new file mode 100644
index 0000000..890a2c2
--- /dev/null
+++ b/vendor/github.com/go-chi/chi/v5/pattern.go
@@ -0,0 +1,16 @@
+//go:build go1.23 && !tinygo
+// +build go1.23,!tinygo
+
+package chi
+
+import "net/http"
+
+// supportsPattern is true if the Go version is 1.23 and above.
+//
+// If this is true, `net/http.Request` has field `Pattern`.
+const supportsPattern = true
+
+// setPattern sets the mux matched pattern in the http Request.
+func setPattern(rctx *Context, r *http.Request) {
+ r.Pattern = rctx.routePattern
+}