Transfer functionality not working: throws Error: Invalid Header

System Information
  • Strapi Version: latest
  • Operating System:
  • Database: mysql 8
  • Node Version:
  • NPM Version:
  • Yarn Version:

setting up the transfer keys etc was a charm; but when triggering the transfer the source system throws this error:

6|strapi4- | [2023-04-01 10:51:51.527] error: Invalid Header
6|strapi4- | Error: Invalid Header
6|strapi4- | at assertValidHeader (/strapi/socagol/node_modules/@strapi/data-transfer/dist/strapi/remote/handlers/utils.js:18:15)
6|strapi4- | at handleWSUpgrade (/strapi/socagol/node_modules/@strapi/data-transfer/dist/strapi/remote/handlers/utils.js:40:35)
6|strapi4- | at Object.runner-pull (/strapi/socagol/node_modules/@strapi/data-transfer/dist/strapi/remote/handlers/utils.js:55:37)
6|strapi4- | at dispatch (/strapi/socagol/node_modules/koa-compose/index.js:42:32)
6|strapi4- | at returnBodyMiddleware (/strapi/socagol/node_modules/@strapi/strapi/lib/services/server/compose-endpoint.js:52:24)
6|strapi4- | at dispatch (/strapi/socagol/node_modules/koa-compose/index.js:42:32)
6|strapi4- | at /strapi/socagol/node_modules/@strapi/admin/server/middlewares/data-transfer.js:11:12
6|strapi4- | at dispatch (/strapi/socagol/node_modules/koa-compose/index.js:42:32)
6|strapi4- | at policiesMiddleware (/strapi/socagol/node_modules/@strapi/strapi/lib/services/server/policy.js:24:11)
6|strapi4- | at dispatch (/strapi/socagol/node_modules/koa-compose/index.js:42:32) - - [01/Apr/2023:10:55:01 +0200] “GET /admin/transfer/runner/pull HTTP/1.1” 500 99 “-” “-” “2405:4802:90b0:a370:a901:f102:c75d:201d” “GET /admin/transfer/runner/pull” (0.028 ms)

does anyone have a sample request? maybe my nginx is garbling it on the port forwarding to node.js?

If you can replicate this issue on a fresh strapi instance an no issue exists yet please create an issue for this on


had the same issue. As the stacktrace reveals, it is a problem with the Websocket (handleWSUpgrade).
Fixed for me in Apache (>2.4.47). with adding this part to my reverse proxy config:

ProxyPass "/strapi/" "http://localhost:8081/" upgrade=websocket

(See more at: mod_proxy_http - Apache HTTP Server Version 2.4 )

Nginx probably similar issue, you need:

      proxy_set_header Upgrade $http_upgrade;
      proxy_set_header Connection "upgrade";


Interesting, I thought it must be something with the proxyting webserver; I am using nginx though, not Apache.

Thanks for posting this issue, by the way, I’m facing the same issue and I’m running strapi in AWS Stack, and I’m using ECS container + AWS API gateway and don’t know where to start troubleshooting.
Any advice?

try to capture the full request coming in including headers. you are likely dropping header or post parameters along your processing chain.

Thanks for Your response!
I did found the issue it was cause our custom API Gateway does not allow websockets