[PATCH links] Fixing logic typo in last domain redirect change
Export this patch
---
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
Applied.
To git@git.code.netlandish.com:~netlandish/links
995a0d7..c877de1 master -> master