Skip to content

Commit fa48b8c

Browse files
wxiaoguangGiteaBot
authored andcommitted
Fix HEAD method for robots.txt (go-gitea#30603)
Fix go-gitea#30601
1 parent 667427b commit fa48b8c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

routers/web/web.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ func Routes() *web.Route {
261261
routes.Get("/metrics", append(mid, Metrics)...)
262262
}
263263

264-
routes.Get("/robots.txt", append(mid, misc.RobotsTxt)...)
264+
routes.Methods("GET,HEAD", "/robots.txt", append(mid, misc.RobotsTxt)...)
265265
routes.Get("/ssh_info", misc.SSHInfo)
266266
routes.Get("/api/healthz", healthcheck.Check)
267267

0 commit comments

Comments
 (0)