Openshift - How to fix csrf-invalid ?
-
Hello.
I know this was asked so much times on the forum, but I've actually a problem since I use the NodeJS build from Openshift: I can't login because of an error, csrf-invalid. I saw everywhere that I had to change the nginx configuration file, but I don't know how to achieve that with my current configuration.
I tried to install nginx, but it failed to resolve the issue. (And Openshift doesn't appreciate it)So, I was thinking that someone found a fix or a way to edit nginx configuration with Openshift.
Thank you for your attention,
Best regards. -
This error message should go away after clearing cache, restarting NodeBB and changing cookie domain setting via NodeBB Admin.
You can also try to install and use Openshift Nginx Cartridge:
https://github.com/gsterjov/openshift-nginx-cartridge -
Hi.
Thank you for your answer.
I already tried to clear my cache and restart NodeBB. However, given that I can't login, I can't access to the dashboard and I can't change the cookie domain setting.
Also, I previously tried to install the Nginx Cartridge, but for some reason, the server doesn't allow multiple cartridge, and I need the MongoDB one. -
I think it should work in chromium based browsers (Chrome, Opera). What happens when you restart OpenShift gear?
-
I work on Chrome so it can't be the problem and I will try to restart the gear soon. Thank you very much for your help.
-
@TzA-0x000000001 if you are not able to login, try clearing the cookie domain directly in the database.
db.objects.update({_key: "config"}, {$set: {cookieDomain: ""}});