Blocked connection to WebSockets server from untrusted origin: Some("file://")    

I can't figure out what I should use as an argument for rpc-cors to make this websocket connection. I've tried ws://localhost, localhost, file://, none of it seems to work. I am using the Polkadot-Js-AppImage.

  • Could you please add more context to your question? What you need is probably all. Commented Apr 1, 2022 at 12:16
  • @SachaLansky Yes all does fix it, but I am trying to see more examples. For example, I have my node behind an Nginx proxy, and so I access it via <IP>:443. How would I specify this for the rpc-cors rule? Commented Apr 1, 2022 at 12:20
  • Better to disable it and config cors from the nginx side
    – h4x3rotab
    Commented Apr 12, 2022 at 6:01
  • @Purple_Turtle did you ever get an answer to this question? if so, can you answer your post below
    – Shawn Tabrizi
    Commented Jun 3, 2022 at 18:09
  • @ShawnTabrizi nope. I just do it with rpc-cors all. I do not recall getting it to work with local host or a specific origin only. Commented Jun 4, 2022 at 19:20


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.