Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect assets path with subfolder in the url #1434

Closed
alxlion opened this issue Nov 18, 2015 · 5 comments
Closed

Incorrect assets path with subfolder in the url #1434

alxlion opened this issue Nov 18, 2015 · 5 comments

Comments

@alxlion
Copy link

alxlion commented Nov 18, 2015

For a Rocket.Chat instance accessible with http://example.com/chat behind a Nginx proxy, images urls aren't correct: /images/logo/logo.svg instead of /chat/logo/logo.svg or images/logo/logo.svg.

ROOT_URL=http://localhost:3000/chat (Docker container)
@buckyball
Copy link

I was just trying to put rocketchat behind a nginx proxy in a location directive, but experienced the same issue. I guess RC needs a dedicated (sub)domain to work. It's a little odd because you can't use an already configured and ssl enabled server and just add RC to it. I wish I had a wildcard cert, but for now I probably just use the letsencrypt beta to create a cert for a subdomain.

On the other hand it's hopefully not too hard to get rocketchat to notice a subfolder ROOT_URL for resource linking. Or is it?

@alxlion
Copy link
Author

alxlion commented Nov 19, 2015

It seems to be a Meteor restriction...

@geekgonecrazy
Copy link
Member

This is for sure a meteor restriction. Unfortunately seems the easiest thing is to just create a subdomain. many do: chat.example.com

@geekgonecrazy
Copy link
Member

I'm going to go ahead and close this.

Looks like it may be underway to support this, or something similar?

meteor/meteor#5203
meteor/com.meteor.cordova-update#6

We may want to show our desire for this there. If anyone find a better place to give feedback to them over this please link to it here.

@Flitterkill
Copy link

Flitterkill commented Apr 9, 2016

Old bump, might be resolved or discussed elsewhere but I didn't find anything else other than this.

Centos 7, Docker, Nginx Proxy. The default footer images link wouldn't pull in any of the uploaded logos. Pretty much the problem referenced above. This is with a dedicated chat.domain.com url.

This should be in the docs I guess but the workaround is stunningly easy. After you upload a logo asset the admin panel immediately provides you with a thumbnail image of it. It's not a thumbnail - it's just a scrunched down version of your logo. Bring up a web inspector on that and you see the link is not images but assets.

<img src="/assets/logo.png" />

Or jpg or svg or whatever you uploaded. No idea if you upload xyz.jpg as a logo asset if it is renamed logo.jpg or remains xyz.jpg. No matter, just change the footer image link to just /assets/whatever... and it works great!

EDIT: Note that this flies on the website only. If your users use Android/Windows/Etc. desktop or mobile clients that local call won't work. You'll need to host the asset somewhere and call it completely i.e. https://whatever.com/and_so_on.../thing.jpg

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants