From f291e5863cb556a1ae97b944bffd599645daf9e9 Mon Sep 17 00:00:00 2001 From: Solderpunk Date: Wed, 1 Jul 2020 14:16:27 +0200 Subject: [PATCH] Enforce certificate zones before anything else. --- handler.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/handler.go b/handler.go index f6c290e..764d950 100644 --- a/handler.go +++ b/handler.go @@ -78,14 +78,14 @@ func handleGeminiRequest(conn net.Conn, config Config, accessLogEntries chan Log parseMollyFiles(path, &config, errorLogEntries) } - // Check for redirects - handleRedirects(URL, config, conn, &log) + // Check whether this URL is in a certificate zone + handleCertificateZones(URL, clientCerts, config, conn, &log) if log.Status != 0 { return } - // Check whether this URL is in a certificate zone - handleCertificateZones(URL, clientCerts, config, conn, &log) + // Check for redirects + handleRedirects(URL, config, conn, &log) if log.Status != 0 { return }