Skip to content

Commit

Permalink
fix: #504 use https as api protocol
Browse files Browse the repository at this point in the history
  • Loading branch information
terwer committed Nov 29, 2024
1 parent e910018 commit 4d39b1e
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion libs/Universal-PicGo-Core/src/plugins/uploader/imgur.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ const handle = async (ctx: IPicGo): Promise<IPicGo> => {
ctx.emit(IBuildInEvent.NOTIFICATION, {
title: ctx.i18n.translate<ILocalesKey>("UPLOAD_FAILED"),
body: ctx.i18n.translate<ILocalesKey>("CHECK_SETTINGS_AND_NETWORK"),
text: "http://docs.imgur.com/api/errno/",
text: "https://docs.imgur.com/api/errno/",
})
if (e?.statusCode) {
errMsg = e.response?.body?.data.error ?? e.response?.body?.data ?? e.stack ?? "unknown error"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ function postOptions(options: IQiniuConfig, fileName: string, token: string, img
.replace(/\//g, "_")
return {
method: "POST",
url: `http://upload${area}.qiniup.com/putb64/-1/key/${base64FileName}`,
url: `https://upload${area}.qiniup.com/putb64/-1/key/${base64FileName}`,
headers: {
Authorization: `UpToken ${token}`,
"Content-Type": mime.lookup(fileName) || "application/octet-stream",
Expand Down
4 changes: 2 additions & 2 deletions libs/Universal-PicGo-Core/src/plugins/uploader/tcyun.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ const postOptions = (
if (!options.version || options.version === "v4") {
return {
method: "POST",
url: `http://${area}.file.myqcloud.com/files/v2/${signature.appId}/${signature.bucket}/${encodeURI(
url: `https://${area}.file.myqcloud.com/files/v2/${signature.appId}/${signature.bucket}/${encodeURI(
path
)}${fileName}`,
headers: {
Expand All @@ -92,7 +92,7 @@ const postOptions = (
} else {
return {
method: "PUT",
url: `http://${options.bucket}.cos.${options.area}.myqcloud.com/${encodeURIComponent(path)}${encodeURIComponent(
url: `https://${options.bucket}.cos.${options.area}.myqcloud.com/${encodeURIComponent(path)}${encodeURIComponent(
fileName
)}`,
headers: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ const postOptions = (options: IUpyunConfig, fileName: string, saveKey: string, i

return {
method: "POST",
url: `http://v0.api.upyun.com/${options.bucket}`,
url: `https://v0.api.upyun.com/${options.bucket}`,
headers: {
// multipart/form-data 是自动设置的,这里不需要
// "Content-Type": "multipart/form-data",
Expand Down

0 comments on commit 4d39b1e

Please sign in to comment.