Skip to content

Commit 8e377b4

Browse files
committed
[WIP] Skip saving session for all API requests
TODO: Determine if we can filter this to just GET requests and if we need to watch for the CSRF protections which generally require saving cookies.
1 parent 3f93eb4 commit 8e377b4

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

app/controllers/api/base_controller.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
module Api
22
class BaseController < ActionController::API
3+
after_action :skip_session
4+
5+
def skip_session
6+
request.session_options[:skip] = true
7+
end
8+
39
TAG_NAMESPACE = "/managed".freeze
410

511
#

0 commit comments

Comments
 (0)