[PR #6337] WebscraperTool bypass cloudflare site by cloudscraper #25234

Closed
opened 2026-02-21 20:24:32 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/langgenius/dify/pull/6337

State: closed
Merged: Yes


Checklist:

Important

Please review the checklist below before submitting your pull request.

  • Please open an issue before creating a PR or link to an existing issue
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I ran dev/reformat(backend) and cd web && npx lint-staged(frontend) to appease the lint gods

Description

Describe the big picture of your changes here to communicate to the maintainers why we should accept this pull request. If it fixes a bug or resolves a feature request, be sure to link to that issue. Close issue syntax: Fixes #<issue number>, see documentation for more details.

Close https://github.com/langgenius/dify/issues/6232

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update, included: Dify Document
  • Improvement, including but not limited to code refactoring, performance optimization, and UI/UX improvement
  • Dependency upgrade

Testing Instructions

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Test A
  • Test B

When I use WebscraperTool in dify cloud, the error has occurred.
I know cloudflare can config WAF white list for USER-AGENT, but it not work. (Maybe the request has been blocked by anti bot before checking WAF white list)

Attention:it's fine when I run dify locally, but if I depoly dify in aws server, it will occur.

My aws server for testing:
image

use langgenius/dify-api:0.6.14 image
image

image

use dify-api:local image which is built in local:

image

**Original Pull Request:** https://github.com/langgenius/dify/pull/6337 **State:** closed **Merged:** Yes --- # Checklist: > [!IMPORTANT] > Please review the checklist below before submitting your pull request. - [x] Please open an issue before creating a PR or link to an existing issue - [x] I have performed a self-review of my own code - [x] I have commented my code, particularly in hard-to-understand areas - [ ] I ran `dev/reformat`(backend) and `cd web && npx lint-staged`(frontend) to appease the lint gods # Description Describe the big picture of your changes here to communicate to the maintainers why we should accept this pull request. If it fixes a bug or resolves a feature request, be sure to link to that issue. Close issue syntax: `Fixes #<issue number>`, see [documentation](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword) for more details. Close https://github.com/langgenius/dify/issues/6232 ## Type of Change - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] This change requires a documentation update, included: [Dify Document](https://github.com/langgenius/dify-docs) - [x] Improvement, including but not limited to code refactoring, performance optimization, and UI/UX improvement - [ ] Dependency upgrade # Testing Instructions Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration - [ ] Test A - [ ] Test B When I use WebscraperTool in dify cloud, the error has occurred. I know cloudflare can config WAF white list for USER-AGENT, but it not work. (Maybe the request has been blocked by anti bot before checking WAF white list) > Attention:it's fine when I run dify locally, but if I depoly dify in aws server, it will occur. My aws server for testing: ![image](https://github.com/user-attachments/assets/035fd662-0118-42ef-a672-d60c78e1637c) use langgenius/dify-api:0.6.14 image ![image](https://github.com/user-attachments/assets/303f32b3-2c4b-4cfe-8bb7-9ebf0c6b2c6e) ![image](https://github.com/user-attachments/assets/19c01cc3-ce62-465c-b3bc-e707567baeeb) use dify-api:local image which is built in local: ![image](https://github.com/user-attachments/assets/82a2242d-bc86-4885-ba37-65027557679a)
yindo added the pull-request label 2026-02-21 20:24:32 -05:00
yindo closed this issue 2026-02-21 20:24:32 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#25234