-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
InertiaRails Controller after action no cookie causes error #109
Comments
Hello @EamonIndigoSpark, can you share your ApplicationController? Maybe cookies it not defined because you are not using cookies rails middleware |
Hi @PedroAugustoRamalhoDuarte `require "will_paginate/array" protect_from_forgery layout :set_layout cache_sweeper :user_stamp_sweeper VALID_CMS_HOSTNAMES = ['conferencestop'] def set_current_org end def authenticate end def set_cms_for_menu def set_layout def hide_main_nav private
end ` |
@EamonIndigoSpark You accidentally share your app password. |
Your ApplicationController looks right its a very strange error, things you can check:
For now you can downgrade de inertia rails version to: 3.0.0, this was the last update without XSRF-TOKEN update |
@PedroAugustoRamalhoDuarte Hi Pedro, |
In the after_action I get an error, where the cookie is null:
require_relative "inertia_rails"
require_relative "helper"
module InertiaRails
module Controller
extend ActiveSupport::Concern
cookies['XSRF-TOKEN'] = form_authenticity_token unless request.inertia? || !protect_against_forgery?
Resulting in this error
undefined method `[]=' for nil:NilClass
The text was updated successfully, but these errors were encountered: