test: fix empty request error and remove node 16 support

This commit is contained in:
DIYgod 2023-07-23 21:41:12 +01:00
parent cd6b5e0f0b
commit 541cae4397
No known key found for this signature in database
2 changed files with 5 additions and 5 deletions

View File

@ -31,7 +31,7 @@ jobs:
strategy:
fail-fast: false
matrix:
node-version: [ 16, 18, 20 ]
node-version: [ 18, 20 ]
name: Jest on Node ${{ matrix.node-version }}
steps:
- name: Collect Workflow Telemetry
@ -78,7 +78,7 @@ jobs:
strategy:
fail-fast: false
matrix:
node-version: [ 16, 18, 20 ]
node-version: [ 18, 20 ]
chromium:
- name: bundled Chromium
dependency: ''
@ -127,7 +127,7 @@ jobs:
strategy:
fail-fast: false
matrix:
node-version: [ 16, 18, 20 ]
node-version: [ 18, 20 ]
defaults:
run:
working-directory: docs
@ -159,7 +159,7 @@ jobs:
strategy:
fail-fast: false
matrix:
node-version: [ 16, 18, 20 ]
node-version: [ 18, 20 ]
name: Build radar and maintainer on Node ${{ matrix.node-version }}
steps:
- uses: actions/checkout@v3

View File

@ -40,7 +40,7 @@ if (agent) {
};
} else if (config.reverseProxyUrl) {
proxyWrapper = (url, options) => {
const urlIn = options.url.toString() || url;
const urlIn = options.url?.toString() || url;
const proxyRegex = new RegExp(proxyObj.url_regex);
if (proxyRegex.test(urlIn) && !urlIn.startsWith(config.reverseProxyUrl) && !options.cookieJar) {
options.url = new URL(`${config.reverseProxyUrl}${encodeURIComponent(urlIn)}`);