Created
September 2, 2023 07:18
-
-
Save clonn/651494a55a9f21a62d60d3fc66991b50 to your computer and use it in GitHub Desktop.
fixed nodebb invalid csrf token with cloudflare https config
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"url": "https://DOMAIN", | |
"secret": "----", | |
"database": "mongo", | |
"mongo": { | |
"host": "127.0.0.1", | |
"port": 27017, | |
"username": "", | |
"password": "", | |
"database": "", | |
"uri": "" | |
}, | |
"port": "4567", | |
"socket.io": { | |
"origins": "*:*" | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 80; | |
server_name DOMAIN; | |
location / { | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
# proxy_set_header X-Forwarded-Proto $scheme; | |
proxy_set_header X-Forwarded-Proto https; | |
proxy_set_header X-Forwarded-Port 443; | |
proxy_set_header Host $http_host; | |
proxy_set_header X-NginX-Proxy true; | |
proxy_pass http://127.0.0.1:4567; | |
proxy_redirect off; | |
# Socket.IO Support | |
proxy_http_version 1.1; | |
proxy_set_header Upgrade $http_upgrade; | |
proxy_set_header Connection "upgrade"; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
this thread saving my time, make a short note.
https://community.nodebb.org/topic/13957/csrf-invalid/4