Files
UNITRONIX 1b240543bd feat(auth): implement SQLite auth consolidation and admin password validation
- Added functionality for safely consolidating legacy auth.db into the selected SQLite database, with options for dry runs and rollbacks.
- Introduced command-line flags for SQLite auth consolidation, including backup directory and rollback options.
- Enhanced admin interface security by requiring a password when the admin port is enabled, preventing unauthorized access.
- Updated related tests to ensure proper handling of admin password requirements and relay authorization logic.
2026-08-05 23:49:42 +02:00

15 lines
498 B
Go

package meshcentral
import "github.com/coder/websocket"
// webSocketAcceptOptions preserves the WebSocket library's same-host origin
// checks by default and permits explicitly configured browser origins. Clients
// without an Origin header, such as MeshAgent, remain protocol-compatible.
func (g *Gateway) webSocketAcceptOptions() *websocket.AcceptOptions {
opts := &websocket.AcceptOptions{}
if g != nil && g.cfg != nil {
opts.OriginPatterns = g.cfg.GetAllowedWSOrigins()
}
return opts
}