feat(config): supports external link for images

This commit is contained in:
Anhgelus Morhtuuzh 2025-08-01 12:54:51 +02:00
parent b7829c5268
commit b87964e81f
Signed by: anhgelus
GPG key ID: 617773CACE89052C
3 changed files with 20 additions and 3 deletions

View file

@ -7,6 +7,7 @@ import (
"fmt"
"github.com/BurntSushi/toml"
"github.com/anhgelus/golatt"
"html/template"
"log/slog"
"net/http"
"os"
@ -127,6 +128,10 @@ func main() {
http.Redirect(w, r, "/", http.StatusTemporaryRedirect)
}
g.TemplateFuncMap = template.FuncMap{
"getImage": getImage,
}
host := fmt.Sprintf(":%d", port)
if dev {
if port != 80 {