RocketChat / RocketChat/Rocket.Chat

Endless loop if use prefix path with ROOT_URL

Open
#22,033 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
46.1k
Forks
13.9k
Avg merge
3d 3h
Merged PRs (30d)
130

Description

Description:

I running Rocket Chat with a prefix path like https://localhost:4000/test and get the error that makes an endless request and freeze my browser.

I had dig into the problem and I found that if I define prefix path, a request to /api/ecdh_proxy/initEncrptedSession on frontend will get 404 Not Found (prefix path not apply to it) that makes an endless request to /api/v1/method.callAnon/getSetupWizardParameters

Steps to reproduce:
  1. Get docker-compose file from https://github.com/RocketChat/Rocket.Chat/blob/develop/docker-compose.yml
  2. Change ROOT_URL to http://localhost:3000/test
  3. Run and open rocketchat URL
Expected behavior:
  • Normal setup wizard page (a request to /api/v1/method.callAnon/getSetupWizardParameters successfully)
  • Add prefix to /api/ecdh_proxy/initEncrptedSession to prevent the endless request
Actual behavior:

image

Server Setup Information:
  • Version of Rocket.Chat Server: 3.14.0
  • Deployment Method: Docker Image
  • MongoDB Version: 4.2.14
Client Setup Information
  • Browser: Google Chrome Version 90.0.4430.212 (Official Build) (64-bit)
  • Operating System: Windows 10 64-bit

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the docker-compose.yml setup and reproduce using ROOT_URL set to http://localhost:3000/test. Inspect how the frontend requests /api/ecdh_proxy/initEncrptedSession and /api/v1/method.callAnon/getSetupWizardParameters when a prefix path is configured. Done means the setup wizard loads normally and the encrypted-session request includes the prefix without an endless request loop.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api, frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.