diff --git a/functions/gateway/handlers/page_handlers.go b/functions/gateway/handlers/page_handlers.go index 3520af37..da8c4770 100644 --- a/functions/gateway/handlers/page_handlers.go +++ b/functions/gateway/handlers/page_handlers.go @@ -207,7 +207,10 @@ func DeriveEventsFromRequest(r *http.Request) ([]types.Event, helpers.CdnLocatio aboutChan := make(chan aboutResult, 1) var pageUser *helpers.UserSearchResult - + subdomainValue := r.Header.Get("X-Mnm-Subdomain-Value") + if subdomainValue != "" { + userId = subdomainValue + } // Start concurrent operations if userId exists if userId != "" { // Single goroutine for all three requests when userId exists @@ -227,7 +230,6 @@ func DeriveEventsFromRequest(r *http.Request) ([]types.Event, helpers.CdnLocatio return } - subdomainValue := r.Header.Get("X-Mnm-Subdomain-Value") if subdomainValue != "" { ownerIds = []string{subdomainValue} } else { diff --git a/functions/gateway/templates/pages/layout.templ b/functions/gateway/templates/pages/layout.templ index a6da42f4..4a7301f8 100644 --- a/functions/gateway/templates/pages/layout.templ +++ b/functions/gateway/templates/pages/layout.templ @@ -23,7 +23,7 @@ templ Layout(sitePage helpers.SitePage, userInfo helpers.UserInfo, pageContent t // 🚨 WARNING 🚨 This filename is automatically updated by PostCSS // ✅ DO commit it to version control whenever you see it change - +