Skip to content
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

Undefined property: Config\App::$CSRFHeaderName #111

Open
hilmanmustofaa opened this issue Sep 14, 2023 · 2 comments
Open

Undefined property: Config\App::$CSRFHeaderName #111

hilmanmustofaa opened this issue Sep 14, 2023 · 2 comments

Comments

@hilmanmustofaa
Copy link

After all prerequisite step, i was able to open the login page. But, when i was tried to login. There is error page with this message "Undefined property: Config\App::$CSRFHeaderName" shown below picture:

image

I have tried to search about the issue, there is similar issue in the myth/auth github issue page : lonnieezell/myth-auth#125 . And i try to do same as the author answer but the issue still exist.

Can someone give me insight about this issue? Thanks.

@clsmedia
Copy link

Hi. New version of Codeigniter4 had changes in config. Some values were moved to separate config files. Check https://codeigniter.com/user_guide/installation/upgrade_440.html#config-files for more info.

@cahyadsn
Copy link

cahyadsn commented Jan 5, 2024

hi @hilmanmustofaa , you can update line 90 by this code:

$.ajaxSetup({headers:{'<?= config('Security')->headerName ?>':$('meta[name="<?= config('Security')->tokenName ?>"]').attr('content')}})

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants