Crossbar caddy reverse proxy -
how set reverse proxy caddy speak crossbar router?
i have docker crossbar router listen on localhost 8080, , use caddy reverse proxy.
below caddyfile:
`0.0.0.0:80 proxy /ws localhost:8080{ proxy_header connection {>connection} proxy_heade upgrade {>upgrade} } header /ws { upgrade "websoket" connection "upgrade" }`
'tcpflow 8080' return nothing when try connect.
below header chrome:
response
http/1.1 101 switching protocols connection: upgrade sec-websocket-accept: r/pdcqjibmcb5xrfvbnsxjmuf9g= sec-websocket-protocol: wamp.2.json server: caddy server: crossbar/0.11.1 upgrade: websocket x-powered-by: autobahnpython/0.10.9 date: tue, 09 feb 2016 14:12:04 gmt
request
get ws://78.46.244.23/ws http/1.1 host: 78.46.244.23 connection: upgrade pragma: no-cache cache-control: no-cache upgrade: websocket origin: chrome://newtab sec-websocket-version: 13 user-agent: mozilla/5.0 (windows nt 6.3; wow64) applewebkit/537.36 (khtm gecko) chrome/48.0.2564.103 safari/537.36 accept-encoding: gzip, deflate, sdch accept-language: it-it,it;q=0.8,en-us;q=0.6,en;q=0.4 sec-websocket-key: oaeuxwnqjzwyflypeyxexw== sec-websocket-extensions: permessage-deflate; client_max_window_bits sec-websocket-protocol: wamp.2.json
below frame:
[1,"realm1",{"roles":{"caller":{"features":{"caller_identification":true,"progressive_call_results":true}},"callee":{"features":{"progressive_call_results":true}},"publisher":{"features":{"subscriber_blackwhite_listing":true,"publisher_exclusion":true,"publisher_identification":true}},"subscriber":{"features":{"publisher_identification":true}}}}]
and console error:
websocket connection 'ws://78.46.244.23/ws' failed: invalid frame header
Comments
Post a Comment