Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save D4R4/f40717e598625732e6a90d0bc8df04d7 to your computer and use it in GitHub Desktop.
Save D4R4/f40717e598625732e6a90d0bc8df04d7 to your computer and use it in GitHub Desktop.
It should probably be placed before the "location /" part of the configuration, also remember to clear cache
location ~ ^.*/(?P<request_basename>[^/]+\.(mp4))$ {
add_header Content-Disposition 'attachment; filename="$request_basename"';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment