hypothesis / hypothesis/product-backlog
Move apiUrl and authority into defaultService setting
- Dominant language
- No language data
- Stars
- 122
- Forks
- 7
- PR merge metrics
- No merged PRs in 30d
Description
This is part of https://github.com/hypothesis/product-backlog/issues/210#issuecomment-296169666
Currently `view-source:https://hypothes.is/app.html` contains this config:
```json
{
"googleAnalytics": "",
"serviceUrl": "https://hypothes.is/",
"release": "",
"authDomain": "hypothes.is",
"websocketUrl": "wss://hypothes.is/ws",
"apiUrl": "https://hypothes.is/api/",
"raven": {
"dsn": "",
"release": ""
}
}
```
Change it by moving `apiUrl` and `authDomain` into a `defaultServices` object and renaming `authDomain` to `authority`:
```json
{
...,
defaultServices: [{
"apiUrl": "https://hypothes.is/api/",
"authority": "hypothes.is",
}],
```
This is so that the `defaultServices` setting has the same array-of-objects structure as the host page's `services` setting, and is just for consistency.
I think this will require three pull requests: 1. Add `defaultServices` to `/app.html` page and _copy_ `apiUrl` and `authority` into it 2. After 1 is deployed change the client to read `apiUrl` and `authority` from `defaultServices` 3. After 2 is deployed remove the original `apiUrl` and `authDomain` settings.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the configuration shown in /app.html and trace where the client reads apiUrl and authDomain. Follow the three-step sequence in the issue: add the copied defaultServices settings, update the client to read them, then remove the original settings after deployment. Done means the defaultServices array matches the host page's services structure and the old settings are no longer used.
Written by the indexing model from the issue text.
Assessment
- Domain
- full-stack
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100