Skip to content

Commit

Permalink
🎨 提供将黑客派图床的图片进行转移的功能:忽略SSL证书 #132
Browse files Browse the repository at this point in the history
  • Loading branch information
adlered committed Dec 23, 2020
1 parent 1a203a7 commit 8d9fa12
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/java/org/b3log/solo/bolo/tool/PBThread.java
Expand Up @@ -26,6 +26,7 @@
import org.b3log.latke.repository.RepositoryException;
import org.b3log.latke.repository.Transaction;
import org.b3log.latke.util.CollectionUtils;
import org.b3log.solo.bolo.SslUtils;
import org.b3log.solo.bolo.pic.util.UploadUtil;
import org.b3log.solo.model.Article;
import org.b3log.solo.model.Option;
Expand Down Expand Up @@ -121,6 +122,7 @@ public void run() {
File file = null;

final URL url = new URL(oldUrl);
SslUtils.ignoreSsl();
final HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setRequestProperty("accept", "image/avif,image/webp,image/apng,image/*,*/*;q=0.8");
conn.setRequestProperty("accept-encoding", "gzip, deflate, br");
Expand Down

0 comments on commit 8d9fa12

Please sign in to comment.