router: support the Access-Control-Request-Private-Network header (#117)

This commit is contained in:
Matthew Penner
2022-01-19 09:27:13 -07:00
committed by GitHub
parent 649dc9663e
commit bb7ee24087
2 changed files with 20 additions and 4 deletions

View File

@@ -286,6 +286,12 @@ type Configuration struct {
// The Panel URL is automatically allowed, this is only needed for adding
// additional origins.
AllowedOrigins []string `json:"allowed_origins" yaml:"allowed_origins"`
// AllowCORSPrivateNetwork sets the `Access-Control-Request-Private-Network` header which
// allows client browsers to make requests to internal IP addresses over HTTP. This setting
// is only required by users running Wings without SSL certificates and using internal IP
// addresses in order to connect. Most users should NOT enable this setting.
AllowCORSPrivateNetwork bool `json:"allow_cors_private_network" yaml:"allow_cors_private_network"`
}
// NewAtPath creates a new struct and set the path where it should be stored.