From dc8fa8be9b6e29757ab9518b57890513037f0ab2 Mon Sep 17 00:00:00 2001 From: tao wang Date: Fri, 15 Mar 2024 17:28:11 +0800 Subject: [PATCH] ENH:filter amazon and aliyun domain names jira:[for host check] Change-Id: I4e77d28d0fa4f3329da7ac57c7440a5a96742e16 --- src/slic3r/GUI/GUI_App.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/slic3r/GUI/GUI_App.cpp b/src/slic3r/GUI/GUI_App.cpp index 09f8670a1..c32b8e131 100644 --- a/src/slic3r/GUI/GUI_App.cpp +++ b/src/slic3r/GUI/GUI_App.cpp @@ -1079,13 +1079,22 @@ void GUI_App::post_init() std::string download_params_url = url_decode(this->init_params->input_files.front()); auto input_str_arr = split_str(download_params_url, "file="); + std::string download_url; +#if BBL_RELEASE_TO_PUBLIC for (auto input_str : input_str_arr) { - if ( boost::starts_with(input_str, "http://makerworld") || boost::starts_with(input_str, "https://makerworld")) { + if (boost::starts_with(input_str, "http://makerworld") || + boost::starts_with(input_str, "https://makerworld") || + boost::algorithm::contains(input_str, "amazonaws.com") || + boost::algorithm::contains(input_str, "aliyuncs.com")) { download_url = input_str; } } - +#else + for (auto input_str : input_str_arr) { + download_url = input_str; + } +#endif try { //filter relative directories