Files
nginx-ui/settings/http.go
0xJacky 413dc631ee feat: add WebSocketTrustedOrigins configuration and implement origin validation for WebSocket connections
- 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.
2026-03-14 23:37:10 +08:00

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{},
}