RocketChat / RocketChat/Rocket.Chat
Caddy does not support URLs with ports
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 46.1k
- Forks
- 13.9k
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 130
Description
Description:
Setting caddy-url to a URL with a port does not work.
Steps to reproduce:
- Try to set the caddy-url:
$ sudo snap set rocketchat-server caddy-url=https://rocket.example.net:8000
Expected behavior:
The URL is accepted.
Actual behavior:
Setting the URL fails with
$ sudo snap set rocketchat-server caddy-url=https://rocket.example.net:8000
error: cannot perform the following tasks:
- Run configure hook of "rocketchat-server" snap (run hook "configure": "https://rocket.example.net:8000"
is not a valid url)
Server Setup Information:
- Version of Rocket.Chat Server:
- Operating System: Ubuntu 18.03
- Deployment Method: snap
- Number of Running Instances: 1
- DB Replicaset Oplog: NA
- NodeJS Version: NA
- MongoDB Version: NA
Additional context
The issue is contained in the snap configure script where no port is accepted.
Related Problem
An additional related problem is that when caddy is enabled, changes to siteurl are silently ignored because they are overwritten by caddy-url in the same script: https://github.com/RocketChat/Rocket.Chat/blob/119028b17f71df8797a46234cfee7cc6c8ee9217/.snapcraft/snap/hooks/configure#L51
$ sudo snap get rocketchat-server siteurl
https://rocket.example.net
$ sudo snap set rocketchat-server siteurl=https://my-new-url.example.net
$ sudo snap get rocketchat-server siteurl
https://rocket.example.net
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
Read .snapcraft/snap/hooks/configure, especially the validation near line 11 and the siteurl handling near line 51. Reproduce the snap set command with a port, then verify that caddy-url accepts it and that siteurl changes behave as expected when Caddy is enabled.
Written by the indexing model from the issue text.
Assessment
- Domain
- devops
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100