Http request proxy fails when using SSL

Describe the problem/error/question

I’m using the HTTP Request Node in n8n, but it’s not working when I use an HTTPS URL—while HTTP URLs work fine. I saw the similar topics from community but N8N_USE_DEPRECATED_REQUEST_LIB it removed. Do you guys have any advice or recommendation?

My Setup:

  • I have added the necessary certificates to the container OS.
  • The container is running on Kubernetes, and it cannot connect to the internet directly, so we’re using a proxy.
  • When I test the HTTPS URL inside the Kubernetes n8n pod using curl, it works fine.
  • However, when I try the same HTTPS URL in the n8n web interface (HTTP Request Node) and click “Test Workflow”, it fails.

What I’ve Tried:

  • Proxy Configuration: The proxy is correctly configured, and the HTTPS URL is whitelisted.
  • Certificates: All required certificates have been added to the trusted store.
  • Container-Level Testing: Running curl inside the n8n container works without issues.
  • Error Message: When testing via the n8n web interface, I only get the default Nginx error:

“Bad request - please check your parameters.”

Question:

Why does the HTTPS request fail only inside the n8n web interface, even though it works fine via curl inside the pod? How can I fix this?

What is the error message (if any)?

400 - "<HTML><HEAD>\r\n<TITLE>Request Error</TITLE>\r\n</HEAD>\r\n<BODY>\r\n<FONT face=\"Helvetica\">\r\n<big><strong></strong></big><BR>\r\n</FONT>\r\n<blockquote>\r\n<TABLE border=0 cellPadding=1 width=\"80%\">\r\n<TR><TD>\r\n<FONT face=\"Helvetica\">\r\n<big>Request Error (invalid_request)</big>\r\n<BR>\r\n<BR>\r\n</FONT>\r\n</TD></TR>\r\n<TR><TD>\r\n<FONT face=\"Helvetica\">\r\nYour request could not be processed. Request could not be handled\r\n</FONT>\r\n</TD></TR>\r\n<TR><TD>\r\n<FONT face=\"Helvetica\">\r\nThis could be caused by a misconfiguration, or possibly a malformed request.\r\n</FONT>\r\n</TD></TR>\r\n<TR><TD>\r\n<FONT face=\"Helvetica\" SIZE=2>\r\n<BR>\r\nFor assistance, contact your network support team.\r\n</FONT>\r\n</TD></TR>\r\n</TABLE>\r\n</blockquote>\r\n</FONT>\r\n</BODY></HTML>\r\n"

Please share your workflow

image

(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)

Share the output returned by the last node

Information on your n8n setup

  • n8n version: 1.68.0
  • Database (default: SQLite): pgsql
  • n8n EXECUTIONS_PROCESS setting (default: own, main): default
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Docker
  • Operating system: Docker image, alphine linux

Unfortunately, I don’t have a direct answer/solution for you. But if you write that it works via a normal CURL command, you could try the CMD node, or execute content like ‘route’ in it to debug everything better.

1 Like

Thank you for your response. That’s a great idea I will use the CMD node until the Axis proxy issue is resolved.

Using the CMD node means I’ll have to hard-code the Bearer token in the cURL command. On the other hand, the HTTP Request node allows me to utilize the shared Bearer token section, which is why I was trying to use it.

Thanks again for your help!

Hi, I’m also getting what seems to be a similar error. I am using n8n version 1.56.2 in k8s and also configured proxy to connect to the internet. I also tried curl in the container and it worked, but when using the http request node on the interface, it returned a 502 error. I tried configuring SSL bypass but it’s still the same. Hope someone can help me.

This is a rather old version - please upgrade to the latest release first to make sure this hasn’t already been fixed.

1 Like

Thanks, I’ll try again with a newer version, hopefully I don’t get this error again.

1 Like

Did you upgrade and try it? are you still encounter this issue?

Unfortunately, I am using Mysql as the database for N8n and got the error as shown when upgrading from version 1.56.2 to 1.77.3. Can anyone help me?