← Code-Übersicht

policy.js

Pfad: wetell-headless/policy.js

Ext: js

Größe: 359 Bytes

Geändert: 2026-07-16 17:10:12+02

'use strict';

const ALLOWED_HOST = 'mein.wetell.de';

function allowedUrl(value, base = 'https://mein.wetell.de/') {
    const url = new URL(String(value), base);
    if (url.protocol !== 'https:' || url.hostname !== ALLOWED_HOST || url.port) {
        throw new Error('url_not_allowed');
    }
    return url.toString();
}

module.exports = { allowedUrl };