mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-08-20 18:49:10 +08:00
fix: missing 'follow_redirects' argument while download plugin packages
This commit is contained in:
parent
f1f1baae9c
commit
8070be9b76
@ -92,9 +92,7 @@ class PluginUploadFromGithubApi(Resource):
|
||||
|
||||
response = PluginService.upload_pkg_from_github(tenant_id, args["repo"], args["version"], args["package"])
|
||||
|
||||
return {
|
||||
"plugin_unique_identifier": response,
|
||||
}
|
||||
return jsonable_encoder(response)
|
||||
|
||||
|
||||
class PluginInstallFromPkgApi(Resource):
|
||||
|
@ -2,7 +2,7 @@ from core.helper import ssrf_proxy
|
||||
|
||||
|
||||
def download_with_size_limit(url, max_download_size: int, **kwargs):
|
||||
response = ssrf_proxy.get(url, **kwargs)
|
||||
response = ssrf_proxy.get(url, follow_redirects=True, **kwargs)
|
||||
if response.status_code == 404:
|
||||
raise ValueError("file not found")
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user