Always register listening endpoints and keep routes public

This commit is contained in:
svemagie
2026-03-08 06:07:41 +01:00
parent 540d83afc3
commit bcd0652538
2 changed files with 5 additions and 9 deletions
+3 -3
View File
@@ -20,8 +20,8 @@
- Webmentions moderation + API: `/webmentions` - Webmentions moderation + API: `/webmentions`
- Conversations + API: `/conversations` - Conversations + API: `/conversations`
- GitHub activity + API: `/github` - GitHub activity + API: `/github`
- Funkwhale activity + API: `/funkwhale` (enabled when `FUNKWHALE_INSTANCE`, `FUNKWHALE_USERNAME`, `FUNKWHALE_TOKEN` are set) - Funkwhale activity + API: `/funkwhale`
- Last.fm activity + API: `/lastfmapi` (enabled when `LASTFM_API_KEY`, `LASTFM_USERNAME` are set) - Last.fm activity + API: `/lastfmapi`
## MongoDB ## MongoDB
@@ -75,7 +75,7 @@
- Last.fm endpoint requirements: - Last.fm endpoint requirements:
- `LASTFM_API_KEY` - `LASTFM_API_KEY`
- `LASTFM_USERNAME` - `LASTFM_USERNAME`
- If these variables are missing, the related endpoint plugin is not enabled and `/listening` will show no listening history. - If these variables are missing, the endpoints still exist but return empty activity until credentials are configured.
## Startup script ## Startup script
+2 -6
View File
@@ -36,10 +36,6 @@ const funkwhaleUsername = process.env.FUNKWHALE_USERNAME;
const funkwhaleToken = process.env.FUNKWHALE_TOKEN; const funkwhaleToken = process.env.FUNKWHALE_TOKEN;
const lastfmApiKey = process.env.LASTFM_API_KEY; const lastfmApiKey = process.env.LASTFM_API_KEY;
const lastfmUsername = process.env.LASTFM_USERNAME; const lastfmUsername = process.env.LASTFM_USERNAME;
const enableFunkwhaleEndpoint = Boolean(
funkwhaleInstance && funkwhaleUsername && funkwhaleToken,
);
const enableLastfmEndpoint = Boolean(lastfmApiKey && lastfmUsername);
const publicationBaseUrl = ( const publicationBaseUrl = (
process.env.PUBLICATION_URL || "https://blog.giersig.eu" process.env.PUBLICATION_URL || "https://blog.giersig.eu"
).replace(/\/+$/, ""); ).replace(/\/+$/, "");
@@ -127,8 +123,8 @@ export default {
"@rmdes/indiekit-endpoint-github", "@rmdes/indiekit-endpoint-github",
"@rmdes/indiekit-endpoint-webmention-io", "@rmdes/indiekit-endpoint-webmention-io",
"@rmdes/indiekit-endpoint-conversations", "@rmdes/indiekit-endpoint-conversations",
...(enableFunkwhaleEndpoint ? ["@rmdes/indiekit-endpoint-funkwhale"] : []), "@rmdes/indiekit-endpoint-funkwhale",
...(enableLastfmEndpoint ? ["@rmdes/indiekit-endpoint-lastfm"] : []), "@rmdes/indiekit-endpoint-lastfm",
//"@rmdes/indiekit-endpoint-activitypub", //"@rmdes/indiekit-endpoint-activitypub",
], ],
"@indiekit/store-github": { "@indiekit/store-github": {