summaryrefslogtreecommitdiff
path: root/lib/api/snippets.rb
diff options
context:
space:
mode:
authorFrancisco Javier López <fjlopez@gitlab.com>2018-11-23 16:44:09 +0000
committerNick Thomas <nick@gitlab.com>2018-11-23 16:44:09 +0000
commit9a5703ec82d394c2549f5afda7280c889d4cc373 (patch)
treea4a5b2fdaccf5743cff5871fe7b6bac47b42f6cf /lib/api/snippets.rb
parent63c1ad18b77e24af53e6c56fd45f8b2fa5994018 (diff)
downloadgitlab-ce-9a5703ec82d394c2549f5afda7280c889d4cc373.tar.gz
Set content disposition attachment to several endpoints
Diffstat (limited to 'lib/api/snippets.rb')
-rw-r--r--lib/api/snippets.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/api/snippets.rb b/lib/api/snippets.rb
index 1ae144ca9c1..326d55afd0e 100644
--- a/lib/api/snippets.rb
+++ b/lib/api/snippets.rb
@@ -146,6 +146,7 @@ module API
env['api.format'] = :txt
content_type 'text/plain'
+ header['Content-Disposition'] = 'attachment'
present snippet.content
end
# rubocop: enable CodeReuse/ActiveRecord