Sockjs not using CDN_Prefix
Rocket.Chat version: 0.49-develop
Running Rocketchat behind a subdirectory throws errors because Sockjs is using metoers path prefix instead of CDN_Prefix when it is set.
I am running RC at localhost:3000 with CDN_PREFIX set to chat
I am using a simple nginx reverse proxy which looks like this
location /chat {
proxy_pass http://127.0.0.1:3000/;
}
but seeing this

I've tried a bunch of different things but always seem to hit this.
Do you also have your site url set? You can set with SITE_URL=yoursite/chat
Same problem here. Rocket.Chat 48.1 in a docker container. The SITE URL is https://delin-build/chat.
If i try to upload a file:

What I was attempting to do was host my under a different path then what it was served. So for example have the site url be mysite.com/abc and set the cdn_prefix to /xyz so that I could reverse proxy through nginx like this
location /xyz {
proxy_pass http://mysite.com/abc;
}
For the issue I simplified. I'm skeptical of whether thats even possible, but the concept of the cdn prefix gave me a bit of hope.
@AlecTroemel wow sounds like a complicated setup. If you're going to try the CDN route.. You might try putting your chat on http://chat.mysite.com and then cdn at mysite.com/chat. With:
location /xyz {
proxy_pass http://chat.mysite.com;
}
That might be more likely to work
I agree in the complexity, it feels like over engineering. I'm considering now to just create a page with a full iframe of my rocketchat instance at mysite.com/chat. I believe that would bypass my issues altogether
Did either of those ways work for you? Going to go ahead and close. Please re-open if your problem isn't solved.