CSRF verification failed
Aledangelo opened this issue · comments
Bl4ckSl0th commented
When I log in into PeteReport using my ip address from browser, after the log in it apperas FORBIDEN with this message "CSRF Verification Failed". I'm using firefox and petereport is installed on a linux virtual machine
M commented
Hi,
If you are not using localhost or 127.0.0.1 you need to add your IP or domain into the csrf_trusted_origins configuration. Check petereport/tree/main/app/config/petereport_config.py and add your IP:
'csrf_trusted_origins': env.list('PETEREPORT_DJANGO_CSRF_TRUSTED_ORIGINS', default=['https://localhost', 'https://127.0.0.1']),
Bl4ckSl0th commented
Thanks, it works