Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

workflow node http-request header cover #12841

Open
5 tasks done
opsvr202 opened this issue Jan 18, 2025 · 1 comment
Open
5 tasks done

workflow node http-request header cover #12841

opsvr202 opened this issue Jan 18, 2025 · 1 comment
Labels
🐞 bug Something isn't working 🌊 feat:workflow Workflow related stuff.

Comments

@opsvr202
Copy link

Self Checks

  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

0.15.1

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

The reproduction steps are as follows:

  1. Add an HTTP request node in workflow;
  2. Configure the post request, where the Headers add the key Host and the value is customized;
  3. Execute the http request node;
  4. When grabbing the headers from the interface server, it was found that the Host in the original request headers had been replaced; As shown in the following figure

Image

Image

Image

Due to the replacement of the Headers content, some interfaces may require specifying the Host when making requests, which can lead to exceptions

✔️ Expected Behavior

The Headers of the HTTP request node in workflow retains the original information and sends it to the server

❌ Actual Behavior

Now, in the dify version of workflow, the HTTP request node will replace the Headers content when sending requests

@dosubot dosubot bot added 🌊 feat:workflow Workflow related stuff. 🐞 bug Something isn't working labels Jan 18, 2025
Copy link

dosubot bot commented Jan 18, 2025

The issue you're experiencing with the HTTP request node in Dify replacing the 'Host' header is likely due to how headers are managed in the code. The 'Host' header is set in the to_log method for logging purposes, but this does not affect the actual request sent [1]. However, there might be other parts of the system or network configuration that could be altering the 'Host' header during request execution.

To address this, you might want to check if there are any middleware or network configurations in your environment that could be modifying the 'Host' header. Additionally, reviewing the _assembling_headers method in the Executor class could provide insights into how headers are being set or modified before the request is sent [1]. If the issue persists, consider looking into any custom configurations or proxies that might be affecting the request headers.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working 🌊 feat:workflow Workflow related stuff.
Projects
None yet
Development

No branches or pull requests

1 participant