Allow sublocation hosting
- Dominant language
- JavaScript
- Stars
- 27.2k
- Forks
- 5.6k
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 46
Description
I'd like to selfhost an instance of this but in a sublocation of an existing domain, e.g. `https://gitlab.example.org/shields/`.
As far as I can tell, the only required change would be to make the `pathname` attribute in the following code configurable:
https://github.com/badges/shields/blob/eb969fd442c5a56f2fb0cf0b5b679982be02ec97/core/server/server.js#L300-L312
for example:
```js
pathname: this.config.public.base_url,
```
Contributor guide
Research direction
Start in core/server/server.js at the referenced lines and inspect how the pathname is currently set, along with the public.base_url configuration. Verify the behavior with a self-hosted instance under a URL prefix and confirm that generated links and routing work from that sublocation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100