Openshift - How to fix csrf-invalid ?

Technical Support

Suggested Topics


  • Invalid CSRF on dev install

    Solved Technical Support
    2
    0 Votes
    2 Posts
    365 Views

    Fixed 🙂

    I should have remembered that this database is from PROD, therefore, the cookie domain would need to be deleted. Issuing db.objects.update({_key: "config"}, {$set: {cookieDomain: ""}}); in the target DB under MongoDB, then restarting nodebb resolved the issue.

    Able to login 🙂

  • 0 Votes
    3 Posts
    328 Views

    How should I do it?
    Please let me know.
    Thank you

  • 0 Votes
    2 Posts
    851 Views

    Ok, I solved it by binding a different port from 80 in my config.json:

    { "url": "https://dev.myforum.com", "port": 4567, "database": "mongo", ... }

    So finally NodeBB set express.sid cookie 🙂

  • Invalid session

    Technical Support
    23
    0 Votes
    23 Posts
    9k Views

    Honestly? The purpose of cookiedomain is to let you "genericise" the NodeBB cookie so you can read it (and its session) in another app sharing the same express secret. It's useful, but 99.999% of admins probably don't use it, and setting it can definitely cause problems.

  • 0 Votes
    1 Posts
    769 Views

    Just found this tool and everything has been easy and smooth to install but...

    But how do I replace the upload path with the s3 base url instead of the the site.
    I know the plugin is working as I can see the files hitting my s3 bucket.

    Many thanks --

    Casey