support gpg, human.txt etc
Some checks reported errors
continuous-integration/drone/push Build was killed

This commit is contained in:
Arnas Udovic 2025-03-27 07:53:16 +02:00
parent caad5fec20
commit abc2367c89
3 changed files with 7 additions and 1 deletions

View file

@ -32,6 +32,7 @@ var (
defaultLang string
supportedLang string
key = "WgiPGpt5wM6SVEWo5iqI"
staticFileRegex = `^/(zordsdavini.gpg.asc|(robots|security|humans).txt)$`
)
func init() {
@ -185,6 +186,8 @@ func process(_ context.Context, w gemini.ResponseWriter, r *gemini.Request) {
renderTag(w, r, client)
case regexp.MustCompile(`^/__a/`).MatchString(r.URL.Path):
downloadAttachment(w, r, client)
case regexp.MustCompile(staticFileRegex).MatchString(r.URL.Path):
downloadAttachment(w, r, client)
case regexp.MustCompile(`^/r/.+`).MatchString(r.URL.Path):
redirectAction(w, r, client)
case regexp.MustCompile(`^/mention/[\d\w]+`).MatchString(r.URL.Path):
@ -648,7 +651,6 @@ func processMention(w gemini.ResponseWriter, r *gemini.Request) {
log.Fatalf("template failed: %v", err)
return
}
_, err = w.Write([]byte(page))
if err != nil {
w.WriteHeader(gemini.StatusTemporaryFailure, "Internal server error")

View file

@ -14,8 +14,10 @@ My religion is Nature and I believe what Earth is alive.
### Contact me
=> mailto:zordsdavini@arns.lt E-mail
=> misfin://zordsdavini@arns.lt misfin mail
=> https://s.arns.lt/@zordsdavini @zordsdavini@s.arns.lt
=> https://tv.arns.lt/@zordsdavini @zordsdavini@tv.arns.lt
=> /zordsdavini.gpg.asc 🔑 GPG
## About capsule

View file

@ -14,8 +14,10 @@ Tāp pat eso gomtuos mīlietuos ė mėslėjo, ka Žemė ī gīva.
### parašīk mon
=> mailto:zordsdavini@arns.lt pašta skrabėkė
=> misfin://zordsdavini@arns.lt misfin pašta skrabėkė
=> https://s.arns.lt/@zordsdavini @zordsdavini@s.arns.lt
=> https://tv.arns.lt/@zordsdavini @zordsdavini@tv.arns.lt
=> /zordsdavini.gpg.asc 🔑 GPG
## Aple alkierio