Logout returns 403 CSRF verification failed #18

Closed
opened 2026-07-10 11:04:04 -07:00 by westfarn · 0 comments
Owner

Problem

Going to log out of the site (aimloperations.com/accounts/logout/) returns Forbidden (403) with:

CSRF verification failed. Request aborted.

Expected

Authenticated users should be able to log out successfully and be redirected to the home page.

Notes

  • Logout form in base.html already uses POST + {% csrf_token %}
  • Likely cause: missing/misconfigured CSRF_TRUSTED_ORIGINS (or related cookie/proxy SSL settings) in production behind HTTPS
## Problem Going to log out of the site (aimloperations.com/accounts/logout/) returns **Forbidden (403)** with: > CSRF verification failed. Request aborted. ## Expected Authenticated users should be able to log out successfully and be redirected to the home page. ## Notes - Logout form in `base.html` already uses POST + `{% csrf_token %}` - Likely cause: missing/misconfigured `CSRF_TRUSTED_ORIGINS` (or related cookie/proxy SSL settings) in production behind HTTPS
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: ai_ml_operations/company_site#18