Skip to content

Instantly share code, notes, and snippets.

@eteubert
Created March 14, 2015 08:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eteubert/a27d72351b77f5bfba14 to your computer and use it in GitHub Desktop.
Save eteubert/a27d72351b77f5bfba14 to your computer and use it in GitHub Desktop.
Podlove Publisher: Forced Downloads
<FilesMatch "\.(mp3|m4a|ogg|oga|opus|flac)$">
Header set Content-Disposition "attachment"
</FilesMatch>
AddType audio/mpeg mp3
AddType audio/mp4 m4a
AddType audio/ogg oga ogg
AddType audio/opus opus
AddType audio/flac flac
location ~* (mp3|m4a|ogg|oga|opus|flac)$ {
add_header Content-Disposition "attachment; filename=$1";
}
http {
types {
audio/mpeg mp3;
audio/mp4 m4a;
audio/ogg oga ogg;
audio/opus opus;
audio/flac flac;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment