Skip to content
Merged
Show file tree
Hide file tree
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
3 changes: 2 additions & 1 deletion app/controllers/api/v1/api_controller.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
class Api::V1::ApiController < ApiController::Base
class Api::V1::ApiController < ActionController::API
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Rails change

include ActionController::RequestForgeryProtection
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We use headers and session creds so need both

protect_from_forgery with: :null_session, :if => Proc.new { |c| c.request.format.json? }

rescue_from AuthenticationFailed, with: :authentication_failed
Expand Down
1 change: 1 addition & 0 deletions config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@ class Application < Rails::Application
# Application configuration can go into files in config/initializers
# -- all .rb files in that directory are automatically loaded after loading
# the framework and any gems in your application.
config.autoloader = :zeitwerk
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Force zeitwerk

end
end