diff options
author | Francisco Javier López <fjlopez@gitlab.com> | 2018-11-23 19:44:09 +0300 |
---|---|---|
committer | Nick Thomas <nick@gitlab.com> | 2018-11-23 19:44:09 +0300 |
commit | 9a5703ec82d394c2549f5afda7280c889d4cc373 (patch) | |
tree | a4a5b2fdaccf5743cff5871fe7b6bac47b42f6cf /app/controllers | |
parent | 63c1ad18b77e24af53e6c56fd45f8b2fa5994018 (diff) |
Set content disposition attachment to several endpoints
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/profiles/keys_controller.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/controllers/profiles/keys_controller.rb b/app/controllers/profiles/keys_controller.rb index 3c3dc03a4ee..912421e3d08 100644 --- a/app/controllers/profiles/keys_controller.rb +++ b/app/controllers/profiles/keys_controller.rb @@ -40,7 +40,8 @@ class Profiles::KeysController < Profiles::ApplicationController begin user = UserFinder.new(params[:username]).find_by_username if user.present? - render text: user.all_ssh_keys.join("\n"), content_type: "text/plain" + headers['Content-Disposition'] = 'attachment' + render text: user.all_ssh_keys.join("\n"), content_type: 'text/plain' else return render_404 end |