Securing images so that they are only visible on the local network

Hi!

I’m interested in setting up a self hosted version of Rocketchat and I’m wondering if it’s suitable for my use case.

I’d like to use Rocketchat on a local network. However I’d like all media such as images to be blocked when users are not on the local network.

Is this possible?

Thanks!

Hi!

You can accomplish that with some reverse-proxy “magic”.

Considering that all file uploads will live in urls like:
http://localhost:3000/file-upload/gvXo9w4PfvjKpNocr/someimage.jpg

you can force the reverse-proxy to only allow access to /file-upload/* from the IPs you want.

let me know if this helps :slight_smile: