kiwiirc / kiwibnc

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

can’t establish a connection to the server at wss://mysite.org/

mestaritonttu opened this issue · comments

I updated kiwibnc and kiwiirc, but I can't log into the bnc, getting an unknown error. I see this in the console:
Firefox can’t establish a connection to the server at wss://mysite.org/

My Caddy block is:

proxy /kiwibnc http://127.0.0.1:3001 {
    websocket
    transparent
    without /kiwibnc
}

KiwiBNC config blocks:

bind = [
    "0.0.0.0:3001",
]
websocket_origins = [
    "https://mysite.org",
    "https://www.mysite.org",
    "http://mysite.org:8080",
]
"startupOptions.server" = "mysite.org"
"startupOptions.port" = "443"
"startupOptions.tls" = "true"
"startupOptions.path" = "/kiwibnc/ws/"

I tried out different options changes and put things back to the way they where, but now I don't get the login screen anymore and instead get a blank page and see these sorts of messages in the console:
The resource from “https://mysite.org/static/js/app.2362f19c.js” was blocked due to MIME type (“text/plain”) mismatch (X-Content-Type-Options: nosniff).

I also see these in my Caddy webserver log:
spamcheck.freenode.net - No such site at :80

Still the bnc is putting my user online normally.

Hm, nothing was changed in HTTP handling. Does it work if you access the BNC directly without caddy? The X-Content-Type-Options: nosniff part is especially suspicious as that doesn't exist in kiwibnc.

We had a troubleshooting session in IRC and now the abovementioned startupOptions were replaced by simply
"startupOptions.websocket" = "wss://mysite.org/kiwibnc/ws/"

Now everything works using a direct http://my.ip:3001/ connection after having allowed it in websocket_origins block. Sadly the proxying for mysite.org/kiwibnc suffers from a path rewriting issue, but that is off-topic here, so let's close.

Thanks for the help!