mirror of
https://github.com/nodejs/node.git
synced 2025-08-15 13:48:44 +02:00

Signed-off-by: RafaelGSS <rafael.nunu@hotmail.com> PR-URL: https://github.com/nodejs/node/pull/58517 Reviewed-By: Ethan Arrowood <ethan@arrowood.dev> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com>
19 lines
No EOL
413 B
JavaScript
19 lines
No EOL
413 B
JavaScript
'use strict';
|
|
|
|
const common = require('../../common');
|
|
const assert = require('assert');
|
|
const https = require('https');
|
|
|
|
const url = process.env.URL;
|
|
|
|
{
|
|
const options = {
|
|
rejectUnauthorized: false
|
|
};
|
|
|
|
const req = https.get(url, options, common.mustNotCall('HTTPS request should be blocked'));
|
|
|
|
req.on('error', common.mustCall((err) => {
|
|
assert.strictEqual(err.code, 'ERR_ACCESS_DENIED');
|
|
}));
|
|
} |