mirror of
https://github.com/gomods/athens
synced 2026-02-03 14:20:31 +00:00
15 lines
285 B
Go
15 lines
285 B
Go
package actions
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"github.com/gomods/athens/pkg/config"
|
|
)
|
|
|
|
// robotsHandler implements GET baseURL/robots.txt
|
|
func robotsHandler(c *config.Config) http.HandlerFunc {
|
|
return func(w http.ResponseWriter, r *http.Request) {
|
|
http.ServeFile(w, r, c.RobotsFile)
|
|
}
|
|
}
|