Skip to content

CSRF verification failed. Request aborted. #17

@rngallen

Description

@rngallen

I used waitress with nginx everything works okay, but when I login to the app i got error CSRF verification failed. Request aborted.

site available configurations

# mysite_nginx.conf

server {
    # the port your site will be served on
    listen      82;
    server_name 172.30.1.196;
    charset     utf-8;

    # max upload size
    client_max_body_size 75M;   # adjust to taste
	
	location = /favicon.ico {
		alias C:/Apache24/htdocs/fuel/assets/favicon.ico;
		expires 7d; 
	}
	
	location = robots.txt {
		alias C:/Apache24/htdocs/fuel/frontend/templates/frontend/robortx.txt;
		expires 7d;
	}
    # Django media
    location /media  {
        alias C:/Apache24/htdocs/fuel/media;  # your Django project's media files - amend as required
    }
    # Django static
    location /static {
        alias C:/Apache24/htdocs/fuel/assets; # your Django project's static files - amend as required
        expires 7d; 
    }

    # Finally, send all non-media requests to the Django server.
    location / {
        proxy_pass http://127.0.0.1:92; # See output from runserver.py
		proxy_set_header Host $host; # send host header to django
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; # send client ip to django
        proxy_set_header X-Forwarded-Proto $scheme; # send protocal to django
        #proxy_redirect http://127.0.0.1:91
		
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions