~netlandish/links-dev

links: Fixing logic typo in last domain redirect change v1 APPLIED

Peter Sanchez: 1
 Fixing logic typo in last domain redirect change

 1 files changed, 1 insertions(+), 1 deletions(-)
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.code.netlandish.com/~netlandish/links-dev/patches/178/mbox | git am -3
Learn more about email & git

[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