From d3d5d0df7fcc353318feadb57e1775f10778d505 Mon Sep 17 00:00:00 2001 From: tjpcc Date: Sat, 26 Aug 2023 11:14:07 -0600 Subject: AutoAtom: early exit on any non-gemini requests --- gemini/gemtext/sub.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gemini/gemtext') 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) } -- cgit v1.2.3