rabbitmq / rabbitmq-web-stomp

Provides support for STOMP over WebSockets
Other
89 stars 26 forks source link

Proxy-protocol support #84

Closed Ayanda-D closed 5 years ago

Ayanda-D commented 6 years ago

Similar to direct STOMP & AMQP, Web-STOMP listeners should also support proxy-protocol.

michaelklishin commented 6 years ago

Contributions are welcome :)

michaelklishin commented 6 years ago

Proxy protocol support in Ranch core is under consideration, let's wait until there's a decision.

michaelklishin commented 5 years ago

There's a good chance that Proxy protocol support in Ranch will land before this is addressed in this plugin. It may go into 3.7.x depending on the scope of changes in Ranch and @essen's recommendation.

essen commented 5 years ago

Ranch 1.7 is literally just the current Ranch + PROXY support so it's probably fine. :-)

As for this plugin I released Cowboy 2.6 today and will propose a patch to web stomp/mqtt tomorrow to be merged whenever Cowboy 2.6 gets used in RabbitMQ.

essen commented 5 years ago

Do we want a new rabbitmq_web_stomp option named proxy_protocol or is it enough to be able to specify it from cowboy_opts?

Consistency vs less code?

michaelklishin commented 5 years ago

@essen sorry, missed the comment above in notifications. We are willing to have a bit more code for consistency with the documented way of using proxy protocol with AMQP 0-9-1/AMQP 1.0 and MQTT.

essen commented 5 years ago

No worries that was for next week. :-) Struggled writing a test in the meantime.

essen commented 5 years ago

I've opened a PR at https://github.com/rabbitmq/rabbitmq-web-stomp/pull/98 feel free to try, but note it'll probably be broken in AWS at the time being due to a bug in Ranch that will be fixed soon-ish.

Ayanda-D commented 5 years ago

cheers! ðŸ¤