We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Learn more about funding links in repositories.
Report abuse
1 parent 792da9d commit e7dee98Copy full SHA for e7dee98
commands/http/handler.go
@@ -321,7 +321,9 @@ func (cfg ServerConfig) AllowedOrigins() []string {
321
func (cfg *ServerConfig) SetAllowedOrigins(origins ...string) {
322
cfg.cORSOptsRWMutex.Lock()
323
defer cfg.cORSOptsRWMutex.Unlock()
324
- cfg.cORSOpts.AllowedOrigins = origins
+ o := make([]string, len(origins))
325
+ copy(o, origins)
326
+ cfg.cORSOpts.AllowedOrigins = o
327
}
328
329
func (cfg *ServerConfig) AppendAllowedOrigins(origins ...string) {
0 commit comments