I added this for my beforeFilter:
if($this->params['action'] === 'manage_index'){
$this->Security->unlockedActions = array('manage_index');
$this->Security->csrfCheck = false;
}
And that seems to have done the trick so thanks for the heads up!
Dave
From: [email protected] [mailto:[email protected]] On Behalf
Of sophistry
Sent: Wednesday, November 14, 2012 6:32 PM
To: [email protected]
Subject: Re: nginx and CakePHP
look at this section:
http://book.cakephp.org/2.0/en/core-libraries/components/security-component.
html#using-per-session-tokens-instead-of-one-time-use-tokens
you can turn off the "token" function of the csrf so you'll be able to
submit the form twice.
hth.
On Tuesday, November 13, 2012 4:53:13 PM UTC-5, advantage+ wrote:
I I finally have the site configured to run on nginx but I am getting a
weird error on forms. Anytime the same form is submitted back to back.
For example if I go to login and purposely enter wrong password I end up
back to login invalid user / pass as it should but try to login again I get
error address not found:
<h2>The request has been black-holed</h2>
<p class="error">
<strong>Error: </strong>
The requested address '/login?url=login' was not found on this server..
</p>
Checked firebug and both requests are sent to the same URL address
http://mysite.com/login
Checked the HTML and both forms go to the same URL:
<form id="UserLogin" accept-charset="utf-8" method="post"
action="http://mysite.com/login" sourceindex="0">
First attempt goes as it should. Second has same HTML yet it ends up getting
directed to the url with that crazy ?url= addition.(it does not show up in
the html so something is happening after the submit)
If anyone out there running nginx would mind sharing sites-available/{site}
conf file or any insight.
Thanks,
Dave
--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
Visit this group at http://groups.google.com/group/cake-php?hl=en.
--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
Visit this group at http://groups.google.com/group/cake-php?hl=en.