Skip to content

Commit 27e494a

Browse files
committed
Skip writing session for dashboard/widget*_data GET & HEAD
1 parent b8570b0 commit 27e494a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

app/controllers/dashboard_controller.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ class DashboardController < ApplicationController
1616
external_authenticate kerberos_authenticate saml_login oidc_login]
1717
after_action :cleanup_action, :except => %i[csp_report]
1818

19+
after_action :skip_session_write
20+
21+
def skip_session_write
22+
request.session_options[:skip] = %w[widget_chart_data widget_report_data].include?(action_name) if %w[GET HEAD].include?(request.request_method)
23+
end
24+
1925
def index
2026
redirect_to(:action => 'show')
2127
end

0 commit comments

Comments
 (0)