dify/api/services
kenwoodjw 8bf3f5ea78
fix(api): resolve external knowledge API error due to excessive URL validation (#19003)
The `validators.url` method from the `validators==0.21.0` library enforces a
URL length limit of less than 90 characters, which led to failures in external
knowledge API requests for long URLs.

This PR addresses the issue by replacing `validators.url` with 
`urllib.parse.urlparse`, effectively removing the restrictive URL length check.

Additionally, the unused `validators` dependency has been removed.

Fixes #18981.

Signed-off-by: kenwoodjw <blackxin55+@gmail.com>
2025-04-29 22:32:38 +08:00
..
2025-04-01 02:45:34 -04:00
2025-04-01 02:45:34 -04:00
2024-12-26 00:16:35 +08:00