Basically, I have an API endpoint that allows users to send a POST request to download a CSV file.
The file is downloaded success but if I check the Preview/Response tab
from Chrome Dev tool
of this download request then the file's content is displayed here in human-readable (plain text) format.
Same results with both res.download()
or res.sendFile()
methods. I also configured https (Let's encrypt certificate) for both client and server domains, also additional SSL for Nodejs application.
I understand that these SSL configured will only prevent requests intercepted without encrypting the file's content in response data.
How can I download a file without displaying its content in the Preview/Response tab
?
Any suggestion related to modifying Nodejs code or additional Nginx config will be appreciated.