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

CSRF verification failed. Request aborted. erorr #97

Open
rajesh457 opened this issue Dec 3, 2024 · 2 comments
Open

CSRF verification failed. Request aborted. erorr #97

rajesh457 opened this issue Dec 3, 2024 · 2 comments

Comments

@rajesh457
Copy link

rajesh457 commented Dec 3, 2024

Unable to login after deployment, gives CSRF verification failed. Request aborted. error

image

@almogelias
Copy link

Hello,

Modify the /opt/petereport/app/config/petereport_config.py file and add your Server IP in the following field:

'csrf_trusted_origins': env.list('PETEREPORT_DJANGO_CSRF_TRUSTED_ORIGINS', default=['https://[YourServerIP]','https://localhost', 'https://127.0.0.1'])

Than run the following command:
docker compose build --build-arg TARGETARCH=amd64

And run your docker up:
docker compose up

@robersonrodrigo
Copy link

Hello,

I followed the process as instructed, including modifying the /opt/petereport/app/config/petereport_config.py file and adding the server's IP to the csrf_trusted_origins field. I also rebuilt the Docker containers using the following commands:

docker compose build --build-arg TARGETARCH=amd64
docker compose up -d

However, the 403 CSRF verification failed error persists. Could you please guide me on the next steps or any additional configurations that might resolve this issue?

Looking forward to your response.

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