configuration.js 309 B

123456
  1. import { HttpProxyMiddlewareError } from './errors.js';
  2. export function verifyConfig(options) {
  3. if (!options.target && !options.router) {
  4. throw new HttpProxyMiddlewareError('[HPM] Missing "target" option. Example: {target: "http://www.example.org"}', 'ERR_CONFIG_FACTORY_TARGET_MISSING');
  5. }
  6. }