Action you have requested is not allowed error

后端 未结 11 1796
清酒与你
清酒与你 2020-12-06 06:05

I made a module named Gallery which works fine on my localhost with version 2.0.3, but when using version 2.1.0 on a remote site I can not submit a form and I get the error:

11条回答
  •  [愿得一人]
    2020-12-06 06:45

    It is an old question but this same problem did cost me so much time that I wanted to share what the problem was in my case. It may help someone.

    I am using Codeigniter 3.0.6 and CommunityAuth 3 together with it and I was getting this error after a login.

    It was confusing since the problem would sometimes happen and would not other times.

    My 'base_url' in CI's config.php was set to something like 'www.mysite.com'

    When you browse the site with 'mysite.com' (notice 'www' is not in the address) and you do a form submission that uses CI's 'base_url' setting, like CommunityAuth's login does, then CSRF check fails and you get 'The action you have requested is not allowed.' error.

提交回复
热议问题