修复初始化向导服务外部监听与白名单放行并升级版本至V2.10.5
Some checks are pending
Security Checks / security (push) Waiting to run
Some checks are pending
Security Checks / security (push) Waiting to run
This commit is contained in:
parent
f9e0a425c8
commit
f75bc9854f
@ -58,11 +58,10 @@ func SetupStart() error {
|
|||||||
|
|
||||||
setupHost := strings.TrimSpace(os.Getenv("SMAIL_SETUP_HOST"))
|
setupHost := strings.TrimSpace(os.Getenv("SMAIL_SETUP_HOST"))
|
||||||
if setupHost == "" {
|
if setupHost == "" {
|
||||||
setupHost = "127.0.0.1"
|
setupHost = "0.0.0.0"
|
||||||
}
|
} else if setupHost != "127.0.0.1" && setupHost != "localhost" {
|
||||||
if setupHost != "127.0.0.1" && setupHost != "localhost" {
|
if net.ParseIP(setupHost) == nil {
|
||||||
if net.ParseIP(setupHost) == nil || strings.TrimSpace(os.Getenv("SMAIL_SETUP_ALLOWED_CIDRS")) == "" || strings.TrimSpace(os.Getenv("SMAIL_SETUP_TOKEN")) == "" {
|
setupHost = "0.0.0.0"
|
||||||
setupHost = "127.0.0.1"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
setupServer = &http.Server{
|
setupServer = &http.Server{
|
||||||
|
|||||||
@ -166,7 +166,7 @@ install -d -o root -g root -m 0750 /etc/smail
|
|||||||
if [ ! -e /etc/smail/smail.env ]; then
|
if [ ! -e /etc/smail/smail.env ]; then
|
||||||
# 每次部署都重新创建服务环境文件,不继承旧的凭据或代理配置。
|
# 每次部署都重新创建服务环境文件,不继承旧的凭据或代理配置。
|
||||||
umask 0077
|
umask 0077
|
||||||
printf '%s\n' "SMAIL_ROOT=$runtime_dir" 'GOMEMLIMIT=256MiB' > /etc/smail/smail.env
|
printf '%s\n' "SMAIL_ROOT=$runtime_dir" 'GOMEMLIMIT=256MiB' 'SMAIL_SETUP_HOST=0.0.0.0' 'SMAIL_SETUP_ALLOWED_CIDRS=0.0.0.0/0,::/0' > /etc/smail/smail.env
|
||||||
fi
|
fi
|
||||||
if ! grep -q '^SMAIL_PLUGIN_UID=' /etc/smail/smail.env; then
|
if ! grep -q '^SMAIL_PLUGIN_UID=' /etc/smail/smail.env; then
|
||||||
printf 'SMAIL_PLUGIN_UID=%s\n' "$(id -u smail)" >> /etc/smail/smail.env
|
printf 'SMAIL_PLUGIN_UID=%s\n' "$(id -u smail)" >> /etc/smail/smail.env
|
||||||
|
|||||||
@ -57,7 +57,7 @@
|
|||||||
<el-icon><Setting /></el-icon>
|
<el-icon><Setting /></el-icon>
|
||||||
<span class="settings-label">{{ lang.settings }}</span>
|
<span class="settings-label">{{ lang.settings }}</span>
|
||||||
</div>
|
</div>
|
||||||
<span class="app-version-badge">V2.10.4</span>
|
<span class="app-version-badge">V2.10.5</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user