summaryrefslogtreecommitdiff
path: root/gemini
diff options
context:
space:
mode:
authortjpcc <tjp@ctrl-c.club>2023-08-26 11:14:07 -0600
committertjpcc <tjp@ctrl-c.club>2023-08-26 11:14:07 -0600
commitd3d5d0df7fcc353318feadb57e1775f10778d505 (patch)
tree72978d56ce9df0760178ae637890a303d084abf0 /gemini
parent4a5dad998cf97b879e88c8dc1ce025432dfc90cb (diff)
AutoAtom: early exit on any non-gemini requests
Diffstat (limited to 'gemini')
-rw-r--r--gemini/gemtext/sub.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/gemini/gemtext/sub.go b/gemini/gemtext/sub.go
index 5030291..269695f 100644
--- a/gemini/gemtext/sub.go
+++ b/gemini/gemtext/sub.go
@@ -41,7 +41,7 @@ func GmisubToAtom(doc Document, location url.URL, out io.Writer) error {
// gemini://gemini.circumlunar.space/docs/companion/subscription.gmi
var AutoAtom = types.Middleware(func(h types.Handler) types.Handler {
return types.HandlerFunc(func(ctx context.Context, request *types.Request) *types.Response {
- if !strings.HasSuffix(request.Path, ".atom") {
+ if request.Scheme != "gemini" || !strings.HasSuffix(request.Path, ".atom") {
return h.Handle(ctx, request)
}