santifer/career-ops · error · Error
getonbrd: URL must use HTTPS: ${url}
Error message
getonbrd: URL must use HTTPS: ${url} What it means
getonbrd.mjs throws this in assertGetonbrdUrl() after the URL parses but its protocol is not 'https:'. It enforces TLS for the Get on Board feed. Since the validated URL derives from FEED_BASE, a live throw means FEED_BASE (or a test argument) was set to an http:// or other-scheme URL.
Source
Thrown at providers/getonbrd.mjs:29
// 3, override with `max_pages` on the portal entry).
//
// Wire in via a `job_boards:` entry with `provider: getonbrd`.
const FEED_BASE = 'https://www.getonbrd.com/api/v0/categories/programming/jobs';
const TRUSTED_HOST = 'www.getonbrd.com';
const PER_PAGE = 100;
const DEFAULT_MAX_PAGES = 3;
const MAX_PAGES_CAP = 50;
/** @param {string} url */
function assertGetonbrdUrl(url) {
let parsed;
try {
parsed = new URL(url);
} catch {
throw new Error(`getonbrd: invalid URL: ${url}`);
}
if (parsed.protocol !== 'https:') throw new Error(`getonbrd: URL must use HTTPS: ${url}`);
if (parsed.hostname !== TRUSTED_HOST) {
throw new Error(`getonbrd: untrusted hostname "${parsed.hostname}" — must be ${TRUSTED_HOST}`);
}
return url;
}
/** Resolve the page cap: a positive integer `max_pages` on the entry, capped. */
function resolveMaxPages(entry) {
const v = entry?.max_pages;
if (Number.isInteger(v) && v > 0) return Math.min(v, MAX_PAGES_CAP);
return DEFAULT_MAX_PAGES;
}
/**
* Normalize a single Get on Board job (JSON:API resource). Exported for tests.
*
* Field mapping → the normalized Job shape:
* - title: `attributes.title`, trimmed (items without one are dropped).View on GitHub (pinned to 9b17a8ac97)
Solutions
- Keep FEED_BASE on https:// (the public feed is TLS-only).
- For local interception, trust a proxy CA against the HTTPS endpoint instead of downgrading.
- Remove tests that pass http URLs unless they are explicitly asserting this error.
Example fix
// before const FEED_BASE = 'http://www.getonbrd.com/api/v0/categories/programming/jobs'; // after const FEED_BASE = 'https://www.getonbrd.com/api/v0/categories/programming/jobs';
Defensive patterns
Strategy: validation
Validate before calling
// Confirm the Get on Board feed scheme at startup.
function checkGetonbrdScheme() {
const u = new URL('https://www.getonbrd.com/api/v0/categories/programming/jobs');
if (u.protocol !== 'https:') throw new Error('getonbrd feed must be HTTPS');
} Prevention
- Never set FEED_BASE to http for local debugging; use a trusted proxy CA.
- Add a lint/test forbidding http: in FEED_BASE.
- Document the HTTPS-only policy in the provider header.
When it happens
Trigger: FEED_BASE changed to 'http://www.getonbrd.com/...' for local interception; a test calls assertGetonbrdUrl('http://www.getonbrd.com/...'); a stale fork predates the HTTPS-only policy.
Common situations: Local debugging through a non-TLS proxy; an env override downgraded the scheme; a copy-paste from an old doc link that used http.
Related errors
- gem: URL must use HTTPS: ${url}
- getonbrd: invalid URL: ${url}
- getonbrd: untrusted hostname "${parsed.hostname}" — must be
- flowxtra: untrusted hostname "${parsed.hostname}" — must be
- gem: invalid URL: ${url}
AI-assisted analysis of santifer/career-ops@9b17a8ac97 (2026-08-13).
Data as JSON: /api/errors/df2f2edd19c67ad8.
Report an issue: GitHub.