Replies: 3 comments 5 replies
|
@yanpx169 — This is the same SSRF proxy issue you resolved in your previous discussions, but now it's hitting the internal The sandbox routes all HTTP requests through the Squid SSRF proxy, which blocks private/internal addresses by default since 1.15.0 [1]. Even though you switched from Fix: Add SSRF_PROXY_ALLOW_PRIVATE_DOMAINS=ibot.zx.xxx.com.cn,apiThen restart: docker compose down && docker compose up -dThis is the same mechanism you used to unblock Alternative approach: Instead of making raw HTTP requests from the code node to download files, consider using Dify's built-in file variable handling, which passes file content directly into the node without needing to call the internal API. This would avoid the SSRF proxy entirely and would be more resilient across upgrades. To reply, just mention @dosu. Share context across your team and agents. Try Dosu. |
|
Adding to the SSRF proxy explanation, here's what's happening at the code level: Dify's The issue is that your code node is running in the sandbox environment, which routes all HTTP requests through the Squid SSRF proxy. The proxy blocks private/internal addresses by default for security reasons. Two solutions: Solution 1: Allowlist the Solution 2: Use file variables directly (better approach) In your workflow:
This approach is more resilient because:
The |
|
To answer your specific follow-up: yes, Code nodes do support File-type Setup:
One gotcha: file content is only fetched into the sandbox on the first This sidesteps your entire SSRF proxy / |




Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Self Checks
1. Is this request related to a challenge you're experiencing? Tell me about your story.
When I upgraded from dify version 1.15.0 to version 1.16.0, Normal code doesn't work properly? How can it be solved?
I obtain the files uploaded by users through code nodes and determine the type of the files based on their content:
But the error prompt reads: "Request failed, status code: 403".
log:
my code:
All reactions