topfans/frontend/utils/laser-card/segmentApi.js

49 lines
1.8 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/**
* 智能抠图方案一OSS + IVPD与方案二HTTP 后端,契约见 server/index.js
*
* SEGMENT_TRANSPORTauto | backend | direct详见 segmentApi.example.js
*
* 【方案一 · 推荐生产】ALIYUN_STS_URL仅下发临时密钥的 HTTPSFC 等),不写主账号 AK。
* 【方案一 · 仅开发】ALIYUN_ACCESS_KEY_ID / ALIYUN_ACCESS_KEY_SECRET直配 RAM 子账号 AK有泄露风险上架前务必删除并改用 STS
*/
/** 仅开发RAM 子账号 AccessKeyId勿提交仓库、勿用于正式包 */
export const ALIYUN_ACCESS_KEY_ID = ''
/** 仅开发RAM 子账号 AccessKeySecret */
export const ALIYUN_ACCESS_KEY_SECRET = ''
/** 可选:使用 STS 临时凭证时填写 SecurityToken长期 AK 一般留空 */
export const ALIYUN_SECURITY_TOKEN = ''
/** 生产STS 获取地址GET返回 JSON。若上面已填 AK/SK则不再请求此地址 */
export const ALIYUN_STS_URL = ''
/** OSS Bucket 名(不含域名) */
export const OSS_BUCKET = ''
/** OSS region如 oss-cn-shanghai */
export const OSS_REGION = 'oss-cn-shanghai'
/** 上传目录前缀 */
export const OSS_KEY_PREFIX = 'laser-card-segment/tmp/'
/** imageseg 地域,如 cn-shanghai */
export const IMAGESEG_REGION = 'cn-shanghai'
/** 预留;当前直连抠图走 IVPD不使用 IMM 项目名称 */
export const IMM_PROJECT_NAME = 'laser-card'
/** IVPD 与 OSS 同地域 id如 cn-shanghai */
export const IMM_REGION = 'cn-shanghai'
/**
* auto | backend | direct — 详见 segmentApi.example.js 注释;接后端时改为 backend 并填 SEGMENT_API_BASE。
*/
export const SEGMENT_TRANSPORT = 'auto'
/** 方案二:自建代理根地址(无末尾斜杠);与方案一互斥:有 OSS 且AK 或 STS时不会走代理 */
export const SEGMENT_API_BASE = ''
export const SEGMENT_API_TOKEN = ''