linkPreviews: Enforce TLS validity
When a URL is prefixed with a TLS scheme, we should make sure that the remote provides a valid cert, even just for prefetches. Else MITM of such a site is trivial. This probably breaks some people with self signed cert, but the age where that was acceptable is past. We have free CAs now like Let's Encrypt.
This commit is contained in:
parent
11f7ae98be
commit
621fa92036
@ -437,9 +437,6 @@ function fetch(uri: string, headers: Record<string, string>) {
|
||||
retry: 0,
|
||||
timeout: prefetchTimeout || 5000, // milliseconds
|
||||
headers: getRequestHeaders(headers),
|
||||
https: {
|
||||
rejectUnauthorized: false,
|
||||
},
|
||||
});
|
||||
|
||||
gotStream
|
||||
|
Loading…
Reference in New Issue
Block a user