Fix HEAD method for robots.txt (#30603)

Fix #30601
This commit is contained in:
wxiaoguang 2024-04-19 21:43:56 +08:00 committed by GiteaBot
parent 199397a852
commit ed9a8d8c72
1 changed files with 1 additions and 1 deletions

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)