Axios interceptor restored for bodyless POST requests
Bodyless POST requests work again after the axios request interceptor was restored to the n8n 1.x branch following a regression in version 1.123.27.
A regression in n8n 1.123.27 broke HTTP Request nodes sending POST requests with only query parameters—no body. The culprit: an axios request interceptor dropped during a backport from the 2.x branch to 1.x. Without this interceptor, axios force-sets Content-Type: application/x-www-form-urlencoded on bodyless POST requests, causing APIs that validate Content-Type headers to reject them.
The fix restores the missing interceptor to the 1.x branch. Now when config.data is undefined, the interceptor prevents axios from injecting the incorrect Content-Type header. Users who were blocked from applying high/critical security updates because of this regression can proceed with upgrades.
The change touches the core execution engine's request-helper utilities.
View Original GitHub Description
Summary
- Restores the axios request interceptor that was omitted when PR #26852 was backported to the 1.x branch
- Without this interceptor, axios force-sets
Content-Type: application/x-www-form-urlencodedon bodyless POST/PUT/PATCH requests, breaking APIs that validate Content-Type headers - Also restores proxy agent configuration via
setAxiosAgents
Related Linear tickets, Github issues, and Community forum posts
Fixes #27769
Review / Merge checklist
- PR title and summary are descriptive. (conventions)
- Docs updated or follow-up ticket created.
- Tests included.
- PR Labeled with
release/backport(if the PR is an urgent fix that needs to be backported)