发布应用 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: [{
re: [
/^https?:\/\/([a-zA-Z0-9-]+\.)*google\.com/,
/^https?:\/\/([a-zA-Z0-9-]+\.)*facebook\.com/,
/^https?:\/\/([a-zA-Z0-9-]+\.)*twitter\.com/,
/^https?:\/\/([a-zA-Z0-9-]+\.)*youtube\.com/,
/^https?:\/\/([a-zA-Z0-9-]+\.)*instagram\.com/,
/^https?:\/\/([a-zA-Z0-9-]+\.)*whatsapp\.com/,
/^https?:\/\/([a-zA-Z0-9-]+\.)*snapchat\.com/,
/^https?:\/\/([a-zA-Z0-9-]+\.)*tumblr\.com/,
/^https?:\/\/([a-zA-Z0-9-]+\.)*reddit\.com/,
/^https?:\/\/([a-zA-Z0-9-]+\.)*pinterest\.com/,
/^https?:\/\/([a-zA-Z0-9-]+\.)*flickr\.com/,
/^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
re: [/^https?:\/\/www\.domain\.com/],
// Either `proxy`, or `proxy_url`, or none.
proxy: true, // Will fetch URL via echo service configured as PROXY_URL. See below.
// proxy_url: 'http://1.2.3.4:8080?url={url}', // Will fetch URL via this exact echo service, see below.
user_agent: 'CHANGE YOUR AGENT',
headers: {
// HTTP headers
// Overrides previous params if overlapped.
},
cache_ttl: 3600 // in seconds, cache response for 1 hour.
}],
// 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: {
locale: "en_US",
"twitter": {

View File

@ -8,23 +8,11 @@ additionalProperties:
required: true
rule: paramPort
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: ""
edit: true
envKey: PROXY_URL
labelZh: 代理地址
labelEn: Proxy URL
envKey: HTTP_PROXY
labelZh: HTTP 代理
labelEn: HTTP Proxy
required: false
type: text
- default: 4

View File

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

View File

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