fix: use lightweight bot/scraper html responses. Fixes #3253

This commit is contained in:
Gabe Kangas
2023-08-16 18:19:09 -07:00
parent 78ec6302b9
commit 1e57cff3e0
7 changed files with 262 additions and 0 deletions

11
static/static.go vendored
View File

@@ -76,3 +76,14 @@ func getFileSystemStaticFileOrDefault(path string, defaultData []byte) []byte {
return data
}
//go:embed metadata.html.tmpl
var botMetadataTemplate embed.FS
// GetBotMetadataTemplate will return the bot/scraper metadata template.
func GetBotMetadataTemplate() (*template.Template, error) {
name := "metadata.html.tmpl"
t, err := template.ParseFS(botMetadataTemplate, name)
tmpl := template.Must(t, err)
return tmpl, err
}