1

My application and GETH sits on the same server. I only want GETH to accept WS connection on the same server. What is the proper way of setting --ws.origins ? Historically I just used --ws.origins * but I'm sure that is not good practice.

I'm thinking --ws.origins "127.0.0.1" or --ws.origins "ws://127.0.0.1"

7
  • 1
    Is there a particular reason not to use IPC in this case?
    – SimonR
    Commented Jan 27, 2021 at 15:11
  • That's a good question. I've always used WSS. Apologies my technical expertise on this is... not the greatest. Can I use IPC with web3.js ?
    – ceds
    Commented Jan 27, 2021 at 15:12
  • I'm also assuming IPC might give a performance boost ?
    – ceds
    Commented Jan 27, 2021 at 15:14
  • 1
    You can. IPC is generally the way to go if the application sits on the same machine as geth. It's faster, and security is much improved. Check out 'web3.js IPCProvider'.
    – SimonR
    Commented Jan 27, 2021 at 15:17
  • 2
    Does this answer your question? Geth can't connected to via Websocket
    – clement
    Commented Jan 27, 2021 at 19:39

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.