summaryrefslogtreecommitdiffstats
path: root/routers/api/forgejo/v1/root.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/api/forgejo/v1/root.go')
-rw-r--r--routers/api/forgejo/v1/root.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/routers/api/forgejo/v1/root.go b/routers/api/forgejo/v1/root.go
new file mode 100644
index 0000000..b976c51
--- /dev/null
+++ b/routers/api/forgejo/v1/root.go
@@ -0,0 +1,14 @@
+// Copyright The Forgejo Authors.
+// SPDX-License-Identifier: MIT
+
+package v1
+
+import (
+ "net/http"
+)
+
+func Root(w http.ResponseWriter, r *http.Request) {
+ // https://www.rfc-editor.org/rfc/rfc8631
+ w.Header().Set("Link", "</assets/forgejo/api.v1.yml>; rel=\"service-desc\"")
+ w.WriteHeader(http.StatusNoContent)
+}