diff options
author | Sean McGivern <sean@mcgivern.me.uk> | 2017-03-06 10:42:08 +0000 |
---|---|---|
committer | Sean McGivern <sean@mcgivern.me.uk> | 2017-03-06 10:42:08 +0000 |
commit | 633aaf2b6123359e4c7bfce441022a68b2f21222 (patch) | |
tree | 255a09114c072005de5a6e3524efd59189df88d5 /config | |
parent | 4a6bc1f6a415b82e88473f3bd076f95fb4973562 (diff) | |
parent | ee318727774dbec75d5506a4b4749fc4236206d5 (diff) | |
download | gitlab-ce-633aaf2b6123359e4c7bfce441022a68b2f21222.tar.gz |
Merge branch 'etag-notes-polling' into 'master'
Use ETag to improve performance of issue notes polling
Closes #27582
See merge request !9036
Diffstat (limited to 'config')
-rw-r--r-- | config/initializers/8_metrics.rb (renamed from config/initializers/metrics.rb) | 0 | ||||
-rw-r--r-- | config/initializers/etag_caching.rb | 4 | ||||
-rw-r--r-- | config/routes/project.rb | 4 |
3 files changed, 7 insertions, 1 deletions
diff --git a/config/initializers/metrics.rb b/config/initializers/8_metrics.rb index a1517e6afc8..a1517e6afc8 100644 --- a/config/initializers/metrics.rb +++ b/config/initializers/8_metrics.rb diff --git a/config/initializers/etag_caching.rb b/config/initializers/etag_caching.rb new file mode 100644 index 00000000000..eba88801141 --- /dev/null +++ b/config/initializers/etag_caching.rb @@ -0,0 +1,4 @@ +# This middleware has to come after Gitlab::Metrics::RackMiddleware +# in the middleware stack, because it tracks events with +# GitLab Performance Monitoring +Rails.application.config.middleware.use(Gitlab::EtagCaching::Middleware) diff --git a/config/routes/project.rb b/config/routes/project.rb index 2703bf4ab46..7dc7963ab88 100644 --- a/config/routes/project.rb +++ b/config/routes/project.rb @@ -267,7 +267,7 @@ constraints(ProjectUrlConstrainer.new) do resources :group_links, only: [:index, :create, :update, :destroy], constraints: { id: /\d+/ } - resources :notes, only: [:index, :create, :destroy, :update], concerns: :awardable, constraints: { id: /\d+/ } do + resources :notes, only: [:create, :destroy, :update], concerns: :awardable, constraints: { id: /\d+/ } do member do delete :delete_attachment post :resolve @@ -275,6 +275,8 @@ constraints(ProjectUrlConstrainer.new) do end end + get 'noteable/:target_type/:target_id/notes' => 'notes#index', as: 'noteable_notes' + resources :boards, only: [:index, :show] do scope module: :boards do resources :issues, only: [:index, :update] |