RocketChat / RocketChat/Rocket.Chat
Multiple URL to the same server
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 46.1k
- Forks
- 13.9k
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 130
Description
Hello guys,
We have an interesting use case that showed us a little problem, check the example bellow.
We have a server configured with the site URL as "https://weloverocketchat.com", in front of it, there's a proxy that allow users be able to access the server with different url's like "https://weloverocketchat.com.br", "https://loverocketchat.com", "https://rocketchatisthebest.com". Note that it is not a redirect because the browser should preserve the accessed url.
When we access the server with a different url that was configured, we got two little problems:
1) A warning popup to administrator.

2) An error when try to get some image from AWS S3 bucket:
The server response "403 Forbidden" when try GET {Site_URL}/file-upload/KfR8qJwaxxKWFAmrd/photo.jpg
As possible solutions suggestions, we can avoid this kind of verifications with the default site url, or make the "Site_URL" parameter a list.
What do you think about that?
Rocket.Chat Version: 0.49.3
Running Instances: 1
DB Replicaset OpLog: Enabled
Node Version: v4.5.0
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue points to the Administration Site_URL setting, the /file-upload/... route, and AWS S3; begin by reproducing access through an alternate hostname and tracing those entry points. Done means alternate hostnames no longer trigger the administrator warning and image requests no longer return 403, with the behavior covered by a relevant test if one exists.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, typescript
- Domain
- backend, cloud
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100