Setting $cookieSecure = true; |
When I set $cookieSecure = true; in Config/App.php and submit a form I get the following error:
BASEPATH/Security/Security.php at line 193 PHP Code: 186 } My form uses the csrf function to create a token. Why is that a problem?
Simpler is always better
so you got thrown a LogicException ?
can you provide the part of code that creates your form ( or open the form )
(02-22-2019, 03:14 AM)puschie Wrote: so you got thrown a LogicException ? This is the view that creates the form. If I set set $cookieSecure = false; it works fine. PHP Code: <main class="usa-grid usa-section usa-content usa-layout-docs" id="main-content">
Simpler is always better
your form looks valid to me
another reason could be the access type -> secure cookie only works in https requests so for http you need to disable secure cookie ( or disable http access with $forceGlobalSecureRequests ) this is handled in CodeIgniter\Security\Security:241 ( CSRFSetCookie )
"another reason could be the access type
-> secure cookie only works in https requests" I'm using http in development so that could be why. Also looks like the code has changed with the more recent releases. Thanks.
Simpler is always better
|
Welcome Guest, Not a member yet? Register Sign In |