summaryrefslogtreecommitdiff
path: root/plugins/websockets/plugin.go
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/websockets/plugin.go')
-rw-r--r--plugins/websockets/plugin.go9
1 files changed, 6 insertions, 3 deletions
diff --git a/plugins/websockets/plugin.go b/plugins/websockets/plugin.go
index ca5f2f59..1115bd10 100644
--- a/plugins/websockets/plugin.go
+++ b/plugins/websockets/plugin.go
@@ -28,6 +28,9 @@ import (
const (
PluginName string = "websockets"
+
+ RrMode string = "RR_MODE"
+ RrBroadcastPath string = "RR_BROADCAST_PATH"
)
type Plugin struct {
@@ -113,7 +116,7 @@ func (p *Plugin) Serve() chan error {
AllocateTimeout: p.cfg.Pool.AllocateTimeout,
DestroyTimeout: p.cfg.Pool.DestroyTimeout,
Supervisor: p.cfg.Pool.Supervisor,
- }, map[string]string{"RR_MODE": "http"})
+ }, map[string]string{RrMode: "http", RrBroadcastPath: p.cfg.Path})
if err != nil {
errCh <- err
}
@@ -176,7 +179,7 @@ func (p *Plugin) Middleware(next http.Handler) http.Handler {
val, err := p.accessValidator(r)
p.RUnlock()
if err != nil {
- p.log.Error("validation error")
+ p.log.Error("access validation")
w.WriteHeader(400)
return
}
@@ -280,7 +283,7 @@ func (p *Plugin) Reset() error {
AllocateTimeout: p.cfg.Pool.AllocateTimeout,
DestroyTimeout: p.cfg.Pool.DestroyTimeout,
Supervisor: p.cfg.Pool.Supervisor,
- }, map[string]string{"RR_MODE": "http"})
+ }, map[string]string{RrMode: "http", RrBroadcastPath: p.cfg.Path})
if err != nil {
return errors.E(op, err)
}