Hi everyone,
I've installed flaskbb software as shown in documentation and everything forks fine when I run development server ( flaskbb run )
I deployed the flaskbb under nginx / uwsgi, it runs but every time I try to send any form ( login, for example ) I get the error "The CSRF session token is missing."
I tried to use WTF_CSRF_ENABLED = False option but in this case login doesn't work at all. Maybe you have any idea how to resolve the problem?
I'd appreciate any help cause I have no idea. My configuration files:
uwsgi
[uwsgi]
chdir=/path/to/flaskbb/
venv=/path/to/flaskbb/.venv/
socket=127.0.0.1:9003
mount=/flaskbb=wsgi.py
callable=flaskbb
plugin=python
manage-script-name=true
nginx
server {
listen 80 default_server;
root /path/to/myapp_dir;
error_log /var/log/nginx/error.forums.log;
location / {
include uwsgi_params;
uwsgi_pass 127.0.0.1:9001;
}
location /flaskbb/ {
try_files $uri @flaskbb;
}
location /flaskbb/static/ {
alias /path/to/flaskbb/flaskbb/static/;
}
location ~ ^/_themes/([^/]+)/(.*)$ {
alias /path/to/flaskbb/flaskbb/themes/$1/static/$2;
}
location @flaskbb {
include uwsgi_params;
uwsgi_param SCRIPT_NAME /flaskbb;
uwsgi_pass 127.0.0.1:9003;
}
location /static/ {
if (-f $request_filename) {
rewrite ^/static/(.*)$ /static/$1 break;
}
}
}