CSRF token checking was enabled for API controllers in #6223,
producing "Can't verify CSRF token authenticity" log spam. This
disables logging of failed CSRF checks.
This also changes the protection strategy for
PushSubscriptionsController to use exceptions, making it consistent
with other controllers that use sessions.
respond_to :json
before_action :require_user!
+ protect_from_forgery with: :exception
def create
params.require(:subscription).require(:endpoint)
--- /dev/null
+# frozen_string_literal: true
+
+ActionController::Base.log_warning_on_csrf_failure = false