diff options
Diffstat (limited to 'lib/api/api.rb')
-rw-r--r-- | lib/api/api.rb | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/api/api.rb b/lib/api/api.rb index 6f5f4283937..88f91c07194 100644 --- a/lib/api/api.rb +++ b/lib/api/api.rb @@ -45,10 +45,9 @@ module API end before { allow_access_with_scope :api } - before { header['X-Frame-Options'] = 'SAMEORIGIN' } - before { Gitlab::I18n.set_locale(current_user) } + before { Gitlab::I18n.locale = current_user&.preferred_language } - after { Gitlab::I18n.reset_locale } + after { Gitlab::I18n.use_default_locale } rescue_from Gitlab::Access::AccessDeniedError do rack_response({ 'message' => '403 Forbidden' }.to_json, 403) @@ -95,6 +94,8 @@ module API mount ::API::DeployKeys mount ::API::Deployments mount ::API::Environments + mount ::API::Events + mount ::API::Features mount ::API::Files mount ::API::Groups mount ::API::Internal @@ -111,6 +112,7 @@ module API mount ::API::Notes mount ::API::NotificationSettings mount ::API::Pipelines + mount ::API::PipelineSchedules mount ::API::ProjectHooks mount ::API::Projects mount ::API::ProjectSnippets |