diff options
author | Stan Hu <stanhu@gmail.com> | 2015-10-20 00:28:28 -0700 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2015-10-20 07:45:48 -0700 |
commit | 9bfc531ec611d108c45af239a1e5e016b892231b (patch) | |
tree | d7aa71396441ec2014a1c63558fb9889854aeae8 /app/controllers/projects/services_controller.rb | |
parent | 97eafd4b3dbc186fc3d633c20a7e364ebf31849d (diff) | |
download | gitlab-ce-9bfc531ec611d108c45af239a1e5e016b892231b.tar.gz |
Redirect to a default path if HTTP_REFERER is not set
Safari 9.0 does not yet honor the HTML5 `origin-when-cross-origin` mode,
and it's possible load balancers/proxies strip the HTTP_REFERER from
the request header. In these cases, default to some default path.
Closes #3122
Closes https://github.com/gitlabhq/gitlabhq/issues/9731
Diffstat (limited to 'app/controllers/projects/services_controller.rb')
-rw-r--r-- | app/controllers/projects/services_controller.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/projects/services_controller.rb b/app/controllers/projects/services_controller.rb index 129068ef019..42dbb497e01 100644 --- a/app/controllers/projects/services_controller.rb +++ b/app/controllers/projects/services_controller.rb @@ -12,7 +12,7 @@ class Projects::ServicesController < Projects::ApplicationController # Parameters to ignore if no value is specified FILTER_BLANK_PARAMS = [:password] - + # Authorize before_action :authorize_admin_project! before_action :service, only: [:edit, :update, :test] @@ -52,7 +52,7 @@ class Projects::ServicesController < Projects::ApplicationController message = { alert: error_message } end - redirect_to :back, message + redirect_back_or_default(options: message) end private |