Content-Disposition
Because Nginx won’t add the file name into the Content-Disposition
value, we need to tell it to change the format of the header so it includes the file name. This way we can save the file by its original name.
NginX configuration block
location / { add_header Content-Disposition 'attachment; filename="$baseuri"'; … }
CURL Example
curl -I http://cdn.domain.com/example.html HTTP/1.1 200 OK Date: Sat, 07 Mar 2015 23:39:57 GMT Content-Type: text/html;charset=UTF-8 Connection: keep-alive Cache-Control: private Vary: Accept-Encoding Accept-Ranges: bytes Server: NetDNA-cache/2.2 Content-Disposition: attachment; filename="example.html" Link:
If you have any questions or experience any issues, please reach out to the Support Team, live chat and ticket support are available 24/7.