sindresorhus / got

🌐 Human-friendly and powerful HTTP request library for Node.js
MIT License
14.32k stars 938 forks source link

How to setup got using env variables to use self-signed certificates? #2354

Open ievgennaida opened 5 months ago

ievgennaida commented 5 months ago

What would you like to discuss?

How to configure latest GOT using the env variables to respect self-signed certifies? For me it's looks like next are completely ignored:

    NODE_OPTION: --use-openssl-ca
    NODE_EXTRA_CA_CERTS: /etc/ssl/certs/ca-certificates.crt
    # NODE_TLS_REJECT_UNAUTHORIZED: 0

CERTS are installed in the container:


COPY *.crt /usr/local/share/ca-certificates/
RUN update-ca-certificates

Error: UNABLE_TO_GET_ISSUER_CERT

Would appreciate any suggestions.

sindresorhus commented 5 months ago

Refer to the Node.js docs for this. Got uses the built-in http module.