Skip to content

Commit

Permalink
Merge pull request #259 from meetnearme/develop
Browse files Browse the repository at this point in the history
[release] Community / user page subdomains
  • Loading branch information
brianfeister authored Jan 9, 2025
2 parents 41cba41 + 0d96f66 commit 546ead8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions functions/gateway/handlers/page_handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion functions/gateway/templates/pages/layout.templ
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ templ Layout(sitePage helpers.SitePage, userInfo helpers.UserInfo, pageContent t
<link href="https://fonts.googleapis.com/css2?family=Outfit:wght@400&family=Ubuntu+Mono:ital,wght@0,400;0,700;1,400;1,700&family=Anton&family=Unbounded:wght@900&display=swap" rel="stylesheet"/>
// 🚨 WARNING 🚨 This filename is automatically updated by PostCSS
// ✅ DO commit it to version control whenever you see it change
<link rel="stylesheet" href={ templ.EscapeString(os.Getenv("STATIC_BASE_URL") + "/assets/styles.7add3333.css") }/>
<link rel="stylesheet" href={ templ.EscapeString(os.Getenv("STATIC_BASE_URL") + "/assets/styles.28d1fff7.css") }/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<script src="https://unpkg.com/htmx.org@1.9.12"></script>
<script src="https://unpkg.com/htmx.org@1.9.12/dist/ext/json-enc.js"></script>
Expand Down

0 comments on commit 546ead8

Please sign in to comment.