diff options
author | Douwe Maan <douwe@selenight.nl> | 2017-08-02 18:20:31 +0200 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2017-08-02 18:20:31 +0200 |
commit | 14644d40e0852403ba71435bf3a949af00a7d569 (patch) | |
tree | b5f61f5233cbcfa76d5810a11ff5b9423a0c14b6 /lib/api/api.rb | |
parent | 6fe736f2c927340ed8cf827080db781f7c8adcdf (diff) | |
download | gitlab-ce-14644d40e0852403ba71435bf3a949af00a7d569.tar.gz |
Do not validate CSRF token in API unless neededdm-api-current-user
Diffstat (limited to 'lib/api/api.rb')
-rw-r--r-- | lib/api/api.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/api/api.rb b/lib/api/api.rb index 045a0db1842..ad278b251c7 100644 --- a/lib/api/api.rb +++ b/lib/api/api.rb @@ -48,8 +48,8 @@ module API end before { header['X-Frame-Options'] = 'SAMEORIGIN' } - before { Gitlab::I18n.locale = current_user&.preferred_language } + # The locale is set to the current user's locale when `current_user` is loaded after { Gitlab::I18n.use_default_locale } rescue_from Gitlab::Access::AccessDeniedError do |