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 res.download. 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' }
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.