retspen / webvirtmgr

WebVirtMgr panel for manage virtual machine
http://retspen.github.io
2.04k stars 536 forks source link

CSRF and 403rd error #672

Closed ivdok closed 5 years ago

ivdok commented 5 years ago

My nginx.conf is uploaded here. Developer tools show that I indeed receive crsftoken and sessionid cookies, but the reply from server always is "Forbidden (403) CSRF verification failed. Request aborted.", as if my browser doesn't accept cookies. Running server with runserver 0:8000 allows me to login, but it's obviously not a production solution. Defining debug = True in gunicorn.conf.py, surprisingly, didn't make WebVirtMgr spew more logs or make any sense. WTF? It did work on another testbox last week.

ivdok commented 5 years ago

For anybody else coming across this same error - it's related to nginx config error in wiki's template. Find and replace string: proxy_set_header Host $host:$server_port; With: proxy_set_header Host $host; And with that, I'm closing the issue.