File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -312,10 +312,11 @@ func main() {
312312 var httpHandler http.Handler
313313 if len (config .Cors .AllowedOrigins ) > 0 {
314314 c := cors .New (cors.Options {
315- AllowedOrigins : config .Cors .AllowedOrigins ,
316- AllowedMethods : config .Cors .AllowedMethods ,
317- AllowedHeaders : config .Cors .AllowedHeaders ,
318- AllowCredentials : config .Cors .AllowCredentials ,
315+ AllowedOrigins : config .Cors .AllowedOrigins ,
316+ AllowedMethods : config .Cors .AllowedMethods ,
317+ AllowedHeaders : config .Cors .AllowedHeaders ,
318+ AllowCredentials : config .Cors .AllowCredentials ,
319+ AllowPrivateNetwork : config .Cors .AllowPrivateNetwork ,
319320 })
320321
321322 httpHandler = c .Handler (router )
Original file line number Diff line number Diff line change @@ -37,10 +37,11 @@ type Path struct {
3737}
3838
3939type Cors struct {
40- AllowedOrigins []string `yaml:"allowedOrigins"`
41- AllowedMethods []string `yaml:"allowedMethods"`
42- AllowedHeaders []string `yaml:"allowedHeaders"`
43- AllowCredentials bool `yaml:"allowCredentials"`
40+ AllowedOrigins []string `yaml:"allowedOrigins"`
41+ AllowedMethods []string `yaml:"allowedMethods"`
42+ AllowedHeaders []string `yaml:"allowedHeaders"`
43+ AllowCredentials bool `yaml:"allowCredentials"`
44+ AllowPrivateNetwork bool `yaml:"allowPrivateNetwork"`
4445}
4546
4647type Config struct {
You can’t perform that action at this time.
0 commit comments