grantila / fetch-h2

HTTP/1+2 Fetch API client for Node.js
MIT License
336 stars 16 forks source link

self-signed certificates #120

Open valaises opened 1 year ago

valaises commented 1 year ago

Hi! Is there any way to provide self-signed certificates through your library -- FetchH2, or how could I provide the rejectedUnauthorized parameter? Thanks!

mctrafik commented 6 months ago

+1. I saw this question and thought it wasn't supported, but this works:

import { fetch, setup } from 'fetch-h2';

  setup({
    session: {
      rejectUnauthorized: false,
    },
  });