updateCheckService.js Forgejo URL is hard-coded with no env override #57

Closed
opened 2026-05-16 21:43:25 -05:00 by null · 0 comments
Owner

Severity: LOW 🔵

Affected Files

  • services/updateCheckService.js

Problem

The repo API URL for checking the latest version is a static string:

const FORGEJO_API_URL = 'https://dream.scheller.ltd/api/v1/repos/null/BillTracker/releases/latest';

If the Forgejo server changes, becomes unreachable, or the user is running a self-hosted instance pointing to a different repo, the only escape is to edit source code.

Impact

  • Self-hosted users can't override the update check URL
  • If the Forgejo instance moves, the update check silently fails with no way to fix it without code changes
  • No environment variable fallback

Fix

Add an env variable with the hard-coded URL as default:

const FORGEJO_API_URL = process.env.UPDATE_CHECK_URL
  || 'https://dream.scheller.ltd/api/v1/repos/null/BillTracker/releases/latest';

Document in README env vars section.

Acceptance Criteria

  • UPDATE_CHECK_URL env variable overrides the default Forgejo URL
  • Default URL still works when env var is not set
  • README documents the new env variable
## Severity: LOW 🔵 ## Affected Files - `services/updateCheckService.js` ## Problem The repo API URL for checking the latest version is a static string: ```javascript const FORGEJO_API_URL = 'https://dream.scheller.ltd/api/v1/repos/null/BillTracker/releases/latest'; ``` If the Forgejo server changes, becomes unreachable, or the user is running a self-hosted instance pointing to a different repo, the only escape is to edit source code. ## Impact - Self-hosted users can't override the update check URL - If the Forgejo instance moves, the update check silently fails with no way to fix it without code changes - No environment variable fallback ## Fix Add an env variable with the hard-coded URL as default: ```javascript const FORGEJO_API_URL = process.env.UPDATE_CHECK_URL || 'https://dream.scheller.ltd/api/v1/repos/null/BillTracker/releases/latest'; ``` Document in README env vars section. ## Acceptance Criteria - [ ] `UPDATE_CHECK_URL` env variable overrides the default Forgejo URL - [ ] Default URL still works when env var is not set - [ ] README documents the new env variable
null added the
priority:medium
backend
labels 2026-05-16 21:43:25 -05:00
null closed this issue 2026-05-31 12:31:12 -05:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: null/BillTracker#57
No description provided.