Open EnTerr opened 8 years ago
I see there are some provisions for Origin header in https://github.com/lipp/lua-websockets/blob/master/src/websocket/handshake.lua#L54
However i could not find a way to supply origin for sync connect()? client_ev.lua does it because it has ws at hand https://github.com/lipp/lua-websockets/blob/61cca37c9257ce68df6cc94300d5a191a365687d/src/websocket/client_ev.lua#L144 - but how am i supposed to do that for sync.lua?
client_ev.lua
ws
sync.lua
I 'hacked' my way by adding extra argument to connect() and then extending the table https://github.com/lipp/lua-websockets/blob/master/src/websocket/sync.lua#L149
connect()
But not at all sure that's the way - isn't there something more elegant?
I see there are some provisions for Origin header in https://github.com/lipp/lua-websockets/blob/master/src/websocket/handshake.lua#L54
However i could not find a way to supply origin for sync connect()?
client_ev.lua
does it because it hasws
at hand https://github.com/lipp/lua-websockets/blob/61cca37c9257ce68df6cc94300d5a191a365687d/src/websocket/client_ev.lua#L144 - but how am i supposed to do that forsync.lua
?I 'hacked' my way by adding extra argument to
connect()
and then extending the table https://github.com/lipp/lua-websockets/blob/master/src/websocket/sync.lua#L149But not at all sure that's the way - isn't there something more elegant?