[Cloud] Сan't make https request

Hello. I want to send data to my server using my certificate, but an error occurs.
self signed certificate in certificate chain at TLSSocket.onConnectSecure (_tls_wrap.js:1473:34)

Cloud Code
const https = require('https');

const globalOptions = { 
    hostname: 'HERE MY HOSTNAME', 
    port: 4433, 
    path: '/',
    method: 'POST', 
    ca: '-----BEGIN CERTIFICATE----- HERE MY CERTIFICATE -----END CERTIFICATE-----'
};

module.exports = async function (event) {
    var eventString = JSON.stringify(event);
    var options = globalOptions;
    options.headers = {
        'Content-Type': 'application/json',
        'Content-Length': eventString.length
    };
    
    await doRequest(options, eventString);
}

function doRequest(options, data) {
  return new Promise((resolve, reject) => {
    const req = https.request(options, (res) => {
      res.setEncoding('utf8');
      let responseBody = '';

      res.on('data', (chunk) => {
        responseBody += chunk;
      });

      res.on('end', () => {
        resolve(JSON.parse(responseBody));
      });
    });

    req.on('error', (err) => {
      reject(err);
    });

    req.write(data)
    req.end();
  });
}

You may try to add:

rejectUnauthorized: false

to globalOptions. It should allow self-signed certificates without CA.
Does this https request code works if you run it from pure node.js environment?

I lost at the beginning of the code:

const https = require('https');

It works now! Thanks!