mirror of
https://github.com/axllent/mailpit.git
synced 2026-06-27 14:36:07 +00:00
Don't print allowed CORS origins when there are none (empty)
This commit is contained in:
@@ -79,6 +79,10 @@ func setCORSOrigins() {
|
|||||||
corsAllowOrigins[asciiFoldString(host)] = true
|
corsAllowOrigins[asciiFoldString(host)] = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if len(corsAllowOrigins) == 0 {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
if _, wildCard := corsAllowOrigins["*"]; wildCard {
|
if _, wildCard := corsAllowOrigins["*"]; wildCard {
|
||||||
// reset to just wildcard
|
// reset to just wildcard
|
||||||
corsAllowOrigins = make(map[string]bool)
|
corsAllowOrigins = make(map[string]bool)
|
||||||
|
|||||||
Reference in New Issue
Block a user