Need Guidline for Cloud Foundry Hosting,

Trying hosting Node-Red in Cloud Foundry Environment, hosted sucessfully (using following guideline GitHub - cloudfoundry-community/node-red-cf-ready: A visual tool for wiring the Internet of Things ready for any Cloud Foundry instance),

however not able to save any flow, everytime getting this error

Error: [{"logref":"f28e8170ce964527ad18b617f8bed12a","message":"Gateway error: Invalid CSRF Token 'null' was found on the request parameter '_csrf' or header 'X-XSRF-TOKEN'.","stackTrace":"Gateway error: Invalid CSRF Token 'null' was found on the request parameter '_csrf' or header 'X-XSRF-TOKEN'."}]

please support me to resolve it

Did you notice that repository was around 9 years old?

If you want to run node-red in the cloud, there are existing & more up to date solutions including, for example, FlowForge.

You can simply sign-up or host it yourself or in a digital ocean droplet and even aws marketplace.

Full disclosure- I work for FlowForge.

Thanks for Reply, however we have our own cloud environment and infra, we want to deploy node-red here

Ok, well, as I said, FlowForge runs on your own infrastructure as well. The benefits and features you get out of the box (like teams, user management, snapshots etc) make running 1, 10 or more Node-RED instances a simple click of a button! A piece of cake. I'll leave it there.

Edit: and it is open source.

There is a repo for hosting Node-RED on Heroku - GitHub - joeartsea/node-red-heroku: Node-RED in Heroku. Low-code programming for event-driven applications. - I forked that and adapted to my needs.

Perhaps that can give you ideas on how to get it working in your cloud space.

tried Heroku edition as well, deployment sucessful, however same error

Error: [{"logref":"f28e8170ce964527ad18b617f8bed12a","message":"Gateway error: Invalid CSRF Token 'null' was found on the request parameter '_csrf' or header 'X-XSRF-TOKEN'.","stackTrace":"Gateway error: Invalid CSRF Token 'null' was found on the request parameter '_csrf' or header 'X-XSRF-TOKEN'."}]

What are you trying to execute on Node-RED? Have you got a copy of your flow?

i can't deploy any flow getting "X-XSRF-TOKEN" token missing message everytime

I think this is a very specific Cloud Foundry issue. The error reads like the CF gateway is blocking the HTTP request from the editor because it is missing a required CSRF token. However, Node-RED doesn't know anything about Cloud Foundry or what CSRF tokens are needed to get through your gateway.

I don't think this is something we can help you with on the Node-RED side of things. I suggest investigating that error message in relation to Cloud Foundry and see if other people have hit it with other applications and what approaches they took to resolve it.

1 Like

Yes it's cloud foundry related topic as mentioned in initial sibject, however i am looking for guidance where to fee additional code to generate CSRF token and use it for each post request inside node-red flow

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.