github.com/anycable/anycable-go@v1.5.1/sse/config.go (about)

     1  package sse
     2  
     3  const (
     4  	defaultMaxBodySize = 65536 // 64 kB
     5  )
     6  
     7  // Long-polling configuration
     8  type Config struct {
     9  	Enabled bool
    10  	// Path is the URL path to handle long-polling requests
    11  	Path string
    12  	// List of allowed origins for CORS requests
    13  	// We inherit it from the ws.Config
    14  	AllowedOrigins string
    15  }
    16  
    17  // NewConfig creates a new Config with default values.
    18  func NewConfig() Config {
    19  	return Config{
    20  		Enabled: false,
    21  		Path:    "/events",
    22  	}
    23  }