Settings

Theme

Web Socket Hook: A bridge between web hooks and web sockets

web.sockethook.io

32 points by mskierkowski 11 years ago · 4 comments

Reader

icedog 11 years ago

This is better described as a 'publish-subscribe pattern using web sockets'. To be brutally honest (take this as constructive criticism), the addition of the HTTP endpoint isn't very interesting either. Implementing all this takes perhaps less than 100 lines of code.

Furthermore, your site is susceptible to XSS

curl http://web.sockethook.io/hook/foo --data "foo=<script>alert('hello')</script>"

  • mskierkowskiOP 11 years ago

    We fixed the XSS issue. Having said that, this site is just to demonstrate that you can use any standard web socket client (including the one in your browser); normally you would build the XSS mitigation into the client app if necessary.

    What scenario do you have in mind for a "pub-sub pattern using WS"?

    It might not be the scenario we were shooting for. The HTTP endpoint was an important requirement. We needed a way to receive HTTP POST calls in an app which wasn't accessible from the web (i.e. no incoming HTTP, but we could make an outbound WS call). Something like Runscope's Passageway (https://www.runscope.com/docs/passageway) would have been our first choice, but it wasn't easy to bake it into the app itself.

mandeepj 11 years ago

Not sure what problem is this solving. I tried but could not figure out. Sorry

  • mskierkowskiOP 11 years ago

    Creating apps that respond to web hooks but are not directly accessible from the internet.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection