发布应用 Iframely 应用

Signed-off-by: 萌森 <qyg2297248353@163.com>
This commit is contained in:
萌森 2024-08-07 17:04:00 +08:00
parent fc73ca3e73
commit e33258b501
4 changed files with 23 additions and 52 deletions

View File

@ -88,38 +88,28 @@ export default {
} }
}], }],
/*
ENABLED_PROXY: process.env.ENABLED_PROXY === 'true',
PROXY_URL: process.env.PROXY_URL,
PROXY: [{ PROXY: [{
re: [ re: [/^https?:\/\/www\.domain\.com/],
/^https?:\/\/([a-zA-Z0-9-]+\.)*google\.com/,
/^https?:\/\/([a-zA-Z0-9-]+\.)*facebook\.com/, // Either `proxy`, or `proxy_url`, or none.
/^https?:\/\/([a-zA-Z0-9-]+\.)*twitter\.com/, proxy: true, // Will fetch URL via echo service configured as PROXY_URL. See below.
/^https?:\/\/([a-zA-Z0-9-]+\.)*youtube\.com/, // proxy_url: 'http://1.2.3.4:8080?url={url}', // Will fetch URL via this exact echo service, see below.
/^https?:\/\/([a-zA-Z0-9-]+\.)*instagram\.com/,
/^https?:\/\/([a-zA-Z0-9-]+\.)*whatsapp\.com/, user_agent: 'CHANGE YOUR AGENT',
/^https?:\/\/([a-zA-Z0-9-]+\.)*snapchat\.com/, headers: {
/^https?:\/\/([a-zA-Z0-9-]+\.)*tumblr\.com/, // HTTP headers
/^https?:\/\/([a-zA-Z0-9-]+\.)*reddit\.com/, // Overrides previous params if overlapped.
/^https?:\/\/([a-zA-Z0-9-]+\.)*pinterest\.com/, },
/^https?:\/\/([a-zA-Z0-9-]+\.)*flickr\.com/, cache_ttl: 3600 // in seconds, cache response for 1 hour.
/^https?:\/\/([a-zA-Z0-9-]+\.)*blogspot\.com/,
/^https?:\/\/([a-zA-Z0-9-]+\.)*wordpress\.com/,
/^https?:\/\/([a-zA-Z0-9-]+\.)*wikipedia\.org/,
/^https?:\/\/([a-zA-Z0-9-]+\.)*imdb\.com/,
/^https?:\/\/([a-zA-Z0-9-]+\.)*vimeo\.com/,
/^https?:\/\/([a-zA-Z0-9-]+\.)*soundcloud\.com/,
/^https?:\/\/([a-zA-Z0-9-]+\.)*spotify\.com/,
/^https?:\/\/([a-zA-Z0-9-]+\.)*linkedin\.com/
],
proxy: process.env.ENABLED_PROXY === 'true',
proxy_url: process.env.PROXY_URL,
user_agent: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.3',
headers: {},
cache_ttl: 3600
}], }],
// Proxy now requires an echo service endpoint.
// See #354 and example code at
// https://gist.github.com/nleush/7916ee89f7b8d6f0cd478d7335702139
PROXY_URL: 'http://1.2.3.4:8080?url={url}', // Iframely will add `?url=...` to this endpoint
*/
providerOptions: { providerOptions: {
locale: "en_US", locale: "en_US",
"twitter": { "twitter": {

View File

@ -8,23 +8,11 @@ additionalProperties:
required: true required: true
rule: paramPort rule: paramPort
type: number type: number
- default: "false"
edit: true
envKey: ENABLED_PROXY
labelZh: 是否开启代理
labelEn: Enable Proxy
required: true
type: select
values:
- label: 开启
value: "true"
- label: 关闭
value: "false"
- default: "" - default: ""
edit: true edit: true
envKey: PROXY_URL envKey: HTTP_PROXY
labelZh: 代理地址 labelZh: HTTP 代理
labelEn: Proxy URL labelEn: HTTP Proxy
required: false required: false
type: text type: text
- default: 4 - default: 4

View File

@ -24,3 +24,4 @@ services:
- NODE_ENV=production - NODE_ENV=production
- PORT=8061 - PORT=8061
- HOST=0.0.0.0 - HOST=0.0.0.0
- HTTPS_PROXY=${HTTP_PROXY}

View File

@ -22,14 +22,6 @@ iframely 了解来自 1900 多家出版商的富媒体,并且还在不断增
> >
> Debugger UI: '/debug' > Debugger UI: '/debug'
### 代理配置
基本格式:`{protocol}://{host}:{port}`
+ `protocol` - 代理服务器的协议
+ `host` - 代理服务器的主机名
+ `port` - 代理服务器的端口号
### 其他配置 ### 其他配置
自行修改 `config/config.local.js` 配置文件,重启生效 自行修改 `config/config.local.js` 配置文件,重启生效