HTTPS blocking res.sendFile and

Posted September 2, 2018 1.8k views

I have an node.js app using express set up that uses HTTPS. In my code, I have a few routes that use res.sendFile and When I visit these routes via HTTPS, the function does not execute (the function body is not triggered and the files are not sent/downloaded). However, when I visit via HTTP, the function body is executed and the respective files get sent/downloaded.

This happens both with Express and nginx, so I believe the issue to be with HTTPS.

When I tried reverse proxying with nginx and sent a request to the routes via my command line, I got this error back:

{Error: write EPROTO 140735787848576:error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure:../deps/openssl/openssl/ssl/s23_clnt.c:802 at _errnoException (util.js:992:11) at WriteWrap.afterWrite [as oncomplete] (net.js:864:14) code: 'EPROTO', errno: 'EPROTO', syscall: 'write' }
Submit an answer

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!