summaryrefslogtreecommitdiff
path: root/app/controllers/profiles/keys_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/profiles/keys_controller.rb')
-rw-r--r--app/controllers/profiles/keys_controller.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/app/controllers/profiles/keys_controller.rb b/app/controllers/profiles/keys_controller.rb
index 3c3dc03a4ee..dcee8eb7e6e 100644
--- a/app/controllers/profiles/keys_controller.rb
+++ b/app/controllers/profiles/keys_controller.rb
@@ -40,12 +40,13 @@ 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 plain: user.all_ssh_keys.join("\n")
else
return render_404
end
rescue => e
- render text: e.message
+ render html: e.message
end
else
return render_404