santifer/career-ops · error · Error
yourator: URL must use HTTPS: ${url}
Error message
yourator: URL must use HTTPS: ${url} What it means
The Yourator provider only fetches its public jobs API from a hard-pinned HTTPS host. Before any network request, assertYouratorUrl parses the configured careers_url and rejects it if the protocol is not https:. This is a deliberate security guard: the provider will not send requests over plaintext HTTP where responses could be tampered with. It fails fast at configuration time rather than at fetch time.
Source
Thrown at providers/yourator.mjs:83
const SITE_ORIGIN = 'https://www.yourator.co';
const FEED_BASE = `${SITE_ORIGIN}/api/v4/jobs`;
const TRUSTED_HOST = 'www.yourator.co';
// Safety bound only — the loop stops on payload.hasMore. The live board was 88
// pages on 2026-08-18; this leaves room to grow without silently truncating.
const DEFAULT_MAX_PAGES = 120;
const MAX_PAGES_CAP = 500;
const PAGE_DELAY_MS = 200;
/** @param {string} url */
function assertYouratorUrl(url) {
let parsed;
try {
parsed = new URL(url);
} catch {
throw new Error(`yourator: invalid URL: ${url}`);
}
if (parsed.protocol !== 'https:') throw new Error(`yourator: URL must use HTTPS: ${url}`);
if (parsed.hostname !== TRUSTED_HOST) {
throw new Error(`yourator: 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;
}
/**
* Canonical URL for a posting — Source Indexing Policy rule 2, "the shortest
* verifiable path to the employer the source exposes".
*
* Prefers `thirdPartyUrl` (the employer's own ATS page), with the board'sView on GitHub (pinned to 1696bec4d0)
Solutions
- Change the scheme to https:// in the careers_url of the yourator job_boards entry (e.g. https://www.yourator.co/jobs).
- Verify the URL parses with `new URL(url)` and that url.protocol === 'https:' before passing it to the provider.
- If you control the endpoint, serve it over HTTPS; the provider will never fall back to HTTP by design.
Example fix
// before careers_url: http://www.yourator.co/jobs // after careers_url: https://www.yourator.co/jobs
Defensive patterns
Strategy: validation
Validate before calling
import { URL } from 'node:url';
export function isHttpsUrl(u) {
try { return new URL(u).protocol === 'https:'; } catch { return false; }
}
if (!isHttpsUrl(careersUrl)) careersUrl = careersUrl.replace(/^http:/, 'https:'); Type guard
function assertHttps(u) {
const p = new URL(u); // throws on unparseable
if (p.protocol !== 'https:') throw new TypeError(`expected https:, got ${p.protocol}`);
return p;
} Try / catch
try {
runYouratorScan(entry);
} catch (e) {
if (e.message.includes('URL must use HTTPS')) {
entry.careers_url = entry.careers_url.replace(/^http:\/\//i, 'https://');
runYouratorScan(entry);
} else throw e;
} Prevention
- Always write https:// in job_boards careers_url entries; grep config for 'http://' before running scans.
- Normalize scheme in your config loader (http→https) for known-trusted hosts.
- Add a lint/test that parses every careers_url in config and asserts protocol and parsability.
When it happens
Trigger: assertYouratorUrl is called with a URL string whose parsed.protocol is not 'https:' — e.g. a job_boards entry with careers_url: http://www.yourator.co/jobs, or programmatic calls passing http:// or ftp:// URLs, or a URL like HTTPS:// (any scheme other than the exact lowercase 'https:').
Common situations: Copy-pasting the board URL from a browser where a redirect or extension downgraded it to http; hand-writing config with http:// out of habit; a URL string built by concatenation that accidentally lost the 's'; testing against a local mirror served over http.
Related errors
- H1B_API_BASE must not embed credentials.
- ashby: URL must use HTTPS: ${url}
- bamboohr: URL must use HTTPS: ${url}
- breezy: URL must use HTTPS: ${url}
- careerviet: URL must use HTTPS: ${url}
AI-assisted analysis of santifer/career-ops@1696bec4d0 (2026-09-01).
Data as JSON: /api/errors/c7c1cf3c6a0c43e4.
Report an issue: GitHub.