Don't print allowed CORS origins when there are none (empty)

This commit is contained in:
Ralph Slooten
2026-05-28 22:07:29 +12:00
parent 84821d13f9
commit 78fa3db33e

View File

@@ -79,6 +79,10 @@ func setCORSOrigins() {
corsAllowOrigins[asciiFoldString(host)] = true
}
if len(corsAllowOrigins) == 0 {
return
}
if _, wildCard := corsAllowOrigins["*"]; wildCard {
// reset to just wildcard
corsAllowOrigins = make(map[string]bool)