Support Article
misconfigured csrf error when sending HTTP request to Co-Browse
SA-44838
Summary
Internal Server Error when sending any HTTP request to a Co-Browse server.
Error Messages
Error: misconfigured csrf
at getsecret (/cobrowsing/node_modules/csurf/index.js:158:11)
at csrf (/cobrowsing/node_modules/csurf/index.js:57:18)
at exports.customCsrf (/cobrowsing/config/custom-middleware.js:154:3)
at Layer.handle [as handle_request] (/cobrowsing/node_modules/express/lib/router/layer.js:76:5)
at trim_prefix (/cobrowsing/node_modules/express/lib/router/index.js:270:13)
at /cobrowsing/node_modules/express/lib/router/index.js:237:9
at Function.proto.process_params (/cobrowsing/node_modules/express/lib/router/index.js:312:12)
at /cobrowsing/node_modules/express/lib/router/index.js:228:12
at Function.match_layer (/cobrowsing/node_modules/express/lib/router/index.js:295:3)
at next (/cobrowsing/node_modules/express/lib/router/index.js:189:10)
at methodOverride (/cobrowsing/node_modules/method-override/index.js:63:14)
at Layer.handle [as handle_request] (/cobrowsing/node_modules/express/lib/router/layer.js:76:5)
at trim_prefix (/cobrowsing/node_modules/express/lib/router/index.js:270:13)
at /cobrowsing/node_modules/express/lib/router/index.js:237:9
at Function.proto.process_params (/cobrowsing/node_modules/express/lib/router/index.js:312:12)
at /cobrowsing/node_modules/express/lib/router/index.js:228:12
at Function.match_layer (/cobrowsing/node_modules/express/lib/router/index.js:295:3)
at next (/cobrowsing/node_modules/express/lib/router/index.js:189:10)
at session (/cobrowsing/node_modules/express-session/index.js:142:63)
at Layer.handle [as handle_request] (/cobrowsing/node_modules/express/lib/router/layer.js:76:5)
at trim_prefix (/cobrowsing/node_modules/express/lib/router/index.js:270:13)
at /cobrowsing/node_modules/express/lib/router/index.js:237:9
Steps to Reproduce
Install and apply config.json with balancer in server_host_url.
Root Cause
A defect or configuration issue in the operating environment.
Resolution
Perform the following local-change:
- Navigate to the node server console and check the logs for the below URLs.
Co-Browse Server Expected URL ------ {url value}
Actual URL from F5 Load balancer ------ {url value} - Exclude the hostname and ensure the paths of both the URLs are equal. If they are not equal, correct the Actual URL from F5 load balancer.
Tags:
Published February 17, 2018 - Updated December 2, 2021
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.