Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions app/controllers/api/base_controller.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
module Api
class BaseController < ActionController::API
after_action :skip_session_write

def skip_session_write
request.session_options[:skip] = true if %w[GET HEAD OPTIONS].include?(request.request_method)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In discussion, Jason thinks we might not need to gate this for GET as all requests should be able to bypass writing session. 🙏 ❤️

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should make sure some pages using react work after trying to bypass session writes for all request... also make sure API requests outside of the UI still work when reusing a token.

end

TAG_NAMESPACE = "/managed".freeze

#
Expand Down