santifer/career-ops · error · Error

arbeitnow: URL must use HTTPS: ${url}

Error message

arbeitnow: URL must use HTTPS: ${url}

What it means

Part of arbeitnow's `assertArbeitnowUrl` SSRF guard. After `new URL(url)` parses successfully, the provider rejects any scheme other than `https:`. This enforces transport security and blocks `http://` (and exotic schemes) from being used against the trusted host.

Source

Thrown at providers/arbeitnow.mjs:32

// override with `max_pages` on the portal entry).
//
// Wire in via a `job_boards:` entry with `provider: arbeitnow`.

const FEED_BASE = 'https://www.arbeitnow.com/api/job-board-api';
const TRUSTED_HOST = 'www.arbeitnow.com';
const PER_PAGE = 100;
const DEFAULT_MAX_PAGES = 3;
const MAX_PAGES_CAP = 50;

/** @param {string} url */
function assertArbeitnowUrl(url) {
  let parsed;
  try {
    parsed = new URL(url);
  } catch {
    throw new Error(`arbeitnow: invalid URL: ${url}`);
  }
  if (parsed.protocol !== 'https:') throw new Error(`arbeitnow: URL must use HTTPS: ${url}`);
  if (parsed.hostname !== TRUSTED_HOST) {
    throw new Error(`arbeitnow: 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 Arbeitnow job. Exported for unit tests.
 *
 * Field mapping → the normalized Job shape:
 *   - title:    `title`, trimmed (items without one are dropped).

View on GitHub (pinned to 9b17a8ac97)

Solutions

  1. Prefix the URL with `https://`: use `https://www.arbeitnow.com/api/job-board-api`.
  2. Strip any `http://` override from config/env before it reaches the provider.
  3. If testing locally against a TLS-terminating proxy, point it at an https front door rather than disabling the check.

Example fix

// before
const url = 'http://www.arbeitnow.com/api/job-board-api';

// after
const url = 'https://www.arbeitnow.com/api/job-board-api';
Defensive patterns

Strategy: validation

Validate before calling

function ensureHttps(u) {
  try {
    if (new URL(u).protocol !== 'https:') throw new Error(`not https: ${u}`);
    return u;
  } catch { throw new Error(`arbeitnow: bad URL: ${u}`); }
}
const FEED_BASE = ensureHttps(rawBase);

Prevention

When it happens

Trigger: `parsed.protocol !== 'https:'` after a successful parse. Triggered by an `http://www.arbeitnow.com/...` URL, or any other scheme (`ftp:`, `file:`) that resolves to the right host.

Common situations: A config value copied from a non-secure source, an environment that downgrades URLs to http, or a local proxy URL left in place of the real endpoint.

Related errors


AI-assisted analysis of santifer/career-ops@9b17a8ac97 (2026-08-13). Data as JSON: /api/errors/47bacb1cb779b7c5. Report an issue: GitHub.