Subject: [PATCH links] Fixing logic typo in last domain redirect change

From: Peter Sanchez <[email-masked]>
Date: Fri, 29 Aug 2025 07:36:42 -0600

---
 domain/middleware.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/domain/middleware.go b/domain/middleware.go
index 261ce4b..efe2e84 100644
--- a/domain/middleware.go
+++ b/domain/middleware.go
@@ -148,7 +148,7 @@ func DomainRedirect(next echo.HandlerFunc) echo.HandlerFunc {
 		// Remove :PORT if present
 		host := strings.SplitN(mainDomain, ":", 2)[0]
 		domain := ForContext(c.Request().Context())
-		if strings.EqualFold(domain.LookupName, host) &&
+		if !strings.EqualFold(domain.LookupName, host) &&
 			domain.Level == models.DomainLevelSystem {
 			// XXX Populate this from links.InvalidSlugs or better yet, c.Echo().Routes()
 			redirectPaths := []redir{
-- 
2.49.1

---

From: "Peter Sanchez" <[email-masked]>
Date: Fri, 29 Aug 2025 07:38:09 -0600

Applied.

To [email-masked]:~netlandish/links
   995a0d7..c877de1  master -> master