mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2026-05-07 06:23:39 +08:00
- Introduced `WebSocketTrustedOrigins` setting in `app.example.ini` and corresponding documentation. - Refactored WebSocket origin checks across multiple API endpoints to utilize the new middleware for improved security. - Added tests for the new origin validation logic to ensure proper handling of trusted origins and node secret requests.
12 lines
397 B
Go
12 lines
397 B
Go
package settings
|
|
|
|
type HTTP struct {
|
|
GithubProxy string `json:"github_proxy" binding:"omitempty,url"`
|
|
InsecureSkipVerify bool `json:"insecure_skip_verify" protected:"true"`
|
|
WebSocketTrustedOrigins []string `json:"websocket_trusted_origins" binding:"omitempty,dive,url" env:"WEBSOCKET_TRUSTED_ORIGINS"`
|
|
}
|
|
|
|
var HTTPSettings = &HTTP{
|
|
WebSocketTrustedOrigins: []string{},
|
|
}
|