I have a reverse proxy server that takes file from fileserver than sends them to user. I want to change filename before sending. I wrote a rule like below
location ~ downloads/(.*) {
proxy_pass http://HOST:PORT/remote.php/dav/files/$1;
add_header Content-Disposition 'attachment; "filename=$args"';
}
But when i send request i get this error;
ERR_RESPONSE_HEADERS_MULTIPLE_CONTENT_DISPOSITION