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>
15 lines
345 B
JavaScript
15 lines
345 B
JavaScript
'use strict';
|
|
|
|
const common = require('../../common');
|
|
const assert = require('assert');
|
|
const http = require('http');
|
|
|
|
const url = process.env.URL;
|
|
|
|
{
|
|
const req = http.get(url, common.mustNotCall('HTTP request should be blocked'));
|
|
|
|
req.on('error', common.mustCall((err) => {
|
|
assert.strictEqual(err.code, 'ERR_ACCESS_DENIED');
|
|
}));
|
|
}
|