badges / badges/shields

Allow sublocation hosting

Open
#8,972 0 comments 0 reactions 0 assignees View on GitHub
self-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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.