0
0
Fork 0
mirror of https://github.com/go-gitea/gitea synced 2024-11-14 05:51:33 +01:00

Fix HEAD method for robots.txt (#30603) (#30604)

Backport #30603 by wxiaoguang

Fix #30601
This commit is contained in:
Giteabot 2024-04-19 22:43:50 +08:00 committed by GitHub
parent 667427b4b9
commit 79484e1cb7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -261,7 +261,7 @@ func Routes() *web.Route {
routes.Get("/metrics", append(mid, Metrics)...)
}
routes.Get("/robots.txt", append(mid, misc.RobotsTxt)...)
routes.Methods("GET,HEAD", "/robots.txt", append(mid, misc.RobotsTxt)...)
routes.Get("/ssh_info", misc.SSHInfo)
routes.Get("/api/healthz", healthcheck.Check)