always bypass cors s3
This commit is contained in:
parent
a6b73bde6a
commit
e3bd41a05a
@ -21,10 +21,15 @@ export interface S3Config {
|
||||
s3AccessKeyID: string;
|
||||
s3SecretAccessKey: string;
|
||||
s3BucketName: string;
|
||||
bypassCorsLocally?: boolean;
|
||||
|
||||
partsConcurrency?: number;
|
||||
forcePathStyle?: boolean;
|
||||
remotePrefix?: string;
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
*/
|
||||
bypassCorsLocally?: boolean;
|
||||
}
|
||||
|
||||
export interface DropboxConfig {
|
||||
@ -180,6 +185,7 @@ export interface FileOrFolderMixedState {
|
||||
export const API_VER_STAT_FOLDER = "0.13.27";
|
||||
export const API_VER_REQURL = "0.13.26"; // desktop ver 0.13.26, iOS ver 1.1.1
|
||||
export const API_VER_REQURL_ANDROID = "0.14.6"; // Android ver 1.2.1
|
||||
export const API_VER_ENSURE_REQURL_OK = "1.0.0"; // always bypass CORS here
|
||||
|
||||
export const VALID_REQURL =
|
||||
(!Platform.isAndroidApp && requireApiVersion(API_VER_REQURL)) ||
|
||||
|
||||
@ -10,6 +10,7 @@ import {
|
||||
TFile,
|
||||
TFolder,
|
||||
requestUrl,
|
||||
requireApiVersion,
|
||||
} from "obsidian";
|
||||
import cloneDeep from "lodash/cloneDeep";
|
||||
import { createElement, RotateCcw, RefreshCcw, FileText } from "lucide";
|
||||
@ -24,6 +25,7 @@ import {
|
||||
COMMAND_CALLBACK_DROPBOX,
|
||||
COMMAND_URI,
|
||||
REMOTELY_SAVE_VERSION_2024PREPARE,
|
||||
API_VER_ENSURE_REQURL_OK,
|
||||
} from "./baseTypes";
|
||||
import { importQrCodeUri } from "./importExport";
|
||||
import {
|
||||
@ -878,6 +880,10 @@ export default class RemotelySavePlugin extends Plugin {
|
||||
this.settings.deleteToWhere = "system";
|
||||
}
|
||||
this.settings.logToDB = false; // deprecated as of 20240113
|
||||
|
||||
if (requireApiVersion(API_VER_ENSURE_REQURL_OK)) {
|
||||
this.settings.s3.bypassCorsLocally = true; // deprecated as of 20240113
|
||||
}
|
||||
}
|
||||
|
||||
async checkIfPresetRulesFollowed() {
|
||||
|
||||
@ -11,6 +11,7 @@ import {
|
||||
import type { TextComponent } from "obsidian";
|
||||
import { createElement, Eye, EyeOff } from "lucide";
|
||||
import {
|
||||
API_VER_ENSURE_REQURL_OK,
|
||||
API_VER_REQURL,
|
||||
DEFAULT_DEBUG_FOLDER,
|
||||
SUPPORTED_SERVICES_TYPE,
|
||||
@ -962,7 +963,7 @@ export class RemotelySaveSettingTab extends PluginSettingTab {
|
||||
});
|
||||
});
|
||||
|
||||
if (VALID_REQURL) {
|
||||
if (VALID_REQURL && !requireApiVersion(API_VER_ENSURE_REQURL_OK)) {
|
||||
new Setting(s3Div)
|
||||
.setName(t("settings_s3_bypasscorslocally"))
|
||||
.setDesc(t("settings_s3_bypasscorslocally_desc"))
|
||||
|
||||
Loading…
Reference in New Issue
Block a user