Hi,

Does anyone use a websocket REPL over SSL, or do you all develop over plain 
HTTP and then use HTTPS only in production where you don't have the 
clojurescript REPL?

In my development environment, my web page is served over HTTPS. So if I 
tried the following line, the browser blocks the "insecure content":

    (weasel.repl/connect "ws://www.myserver.com:9001")

But if I set up nginx to do the SSL and proxy from 9011 → 9001, then I can 
run this in my CLJS code:

    (weasel.repl/connect "wss://www.myserver.com:9011")

At first it works. I see this in the browser's JS console:

    (i) Opened websocket REPL connection

And I can evaluate code in Emacs/CIDER REPL. But about a minute later...

    (i) Closed websocket REPL connection

And the REPL in Emacs stops working. Maybe the problem is with the nginx 
config. 

    listen       9011;
    [... ssl config ...]
    location / {
        proxy_pass http://localhost:9001;
proxy_redirect   off;
proxy_http_version 1.1;
        proxy_set_header   Upgrade $http_upgrade;
        proxy_set_header   Connection "Upgrade"; 
        proxy_set_header   Host $http_host;
proxy_buffering   off;

Anyone know how to do this?

Maybe this never works, and I have to use a non-SSL dev environment.  

thanks,
Rob




-- 
Note that posts from new members are moderated - please be patient with your 
first post.
--- 
You received this message because you are subscribed to the Google Groups 
"ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojurescript+unsubscr...@googlegroups.com.
To post to this group, send email to clojurescript@googlegroups.com.
Visit this group at https://groups.google.com/group/clojurescript.

Reply via email to