Bagisto Forum

    Bagisto

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups

    save address, delete cart item some ajax based function suddenly have CSRF (419 error) on hosting

    Bug Report
    3
    6
    981
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • O
      otheriz last edited by

      Dear Bagisto team,

      Suddenly some of ajax-based functions like save addresses, delete cart items become errors on hosting..
      on local it's working fine..when upload to hosting it has this 419 CSRF error..

      Please Advice..

      1 Reply Last reply Reply Quote 0
      • V
        Vaishali Agarwal last edited by

        @otheriz
        you may check the cause and find solution here
        https://stackoverflow.com/questions/52764590/laravel-419-error-verifycsrftoken-issue

        1 Reply Last reply Reply Quote 0
        • O
          otheriz last edited by

          @Vaishali-Agarwal thank you, 🙂

          somehow,
          Found some solution after many hours of trying, maybe someone has this problem someday..

          it has this error if using "http://" but when i change to "https://" it's worked...don't know why...
          i don't use the "https://" link before because :

          1. it's development link "dev.domain.com"
          2. my subdomain doesn't have SSL certificate installed..

          but, even it does not have SSL, i don't know why it needs an "https://" link to get worked...

          1 Reply Last reply Reply Quote 0
          • V
            Vaishali Agarwal last edited by

            @otheriz
            It only works on HTTPS as might you have allow cookies to https.
            for more information please check https://github.com/laravel/framework/issues/26106

            Screenshot_60.png

            1 Reply Last reply Reply Quote 0
            • G
              gowtham135 last edited by

              @Vaishali-Agarwal I also encounter the same issue. save address, delete cart not working.I have changed SESSION_SECURE_COOKIE to false and tried out. I tried in incognito also. Please help me with this.

              1 Reply Last reply Reply Quote 0
              • V
                Vaishali Agarwal last edited by

                @gowtham135
                try to flush the project's cache by executing command
                php artisan config:cache

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post