From 68f3aef661cb643fe387d30d04954992ffabfcbd Mon Sep 17 00:00:00 2001 From: iqubik Date: Sat, 4 Apr 2026 23:14:14 +0300 Subject: [PATCH] =?UTF-8?q?fix(install-custom):=20ALLOWED=5FORIGINS=20?= =?UTF-8?q?=D0=B7=D0=B0=D0=B2=D0=B8=D1=81=D0=B8=D1=82=20=D0=BE=D1=82=20USE?= =?UTF-8?q?=5FSSL=20=D0=B0=20=D0=BD=D0=B5=20=D0=BE=D1=82=20=D1=84=D0=BE?= =?UTF-8?q?=D1=80=D0=BC=D0=B0=D1=82=D0=B0=20=D1=85=D0=BE=D1=81=D1=82=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- install-custom.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/install-custom.sh b/install-custom.sh index 2a07ab9..54b8ff0 100644 --- a/install-custom.sh +++ b/install-custom.sh @@ -357,11 +357,11 @@ JWT_SECRET=$(openssl rand -base64 32) ADMIN_USER=$(openssl rand -base64 8 | tr -dc 'A-Za-z0-9' | cut -c1-8) ADMIN_PASS=$(openssl rand -base64 12 | tr -dc 'A-Za-z0-9' | cut -c1-12) -# ALLOWED_ORIGINS -if [[ "$UI_HOST" =~ ^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$ ]]; then - ALLOWED_ORIGINS="http://${UI_HOST}:${FINAL_PORT}" -else +# ALLOWED_ORIGINS — зависит от USE_SSL, а не от формата хоста +if [[ "$USE_SSL" == "true" ]]; then ALLOWED_ORIGINS="https://${UI_HOST}:${FINAL_PORT}" +else + ALLOWED_ORIGINS="http://${UI_HOST}:${FINAL_PORT}" fi log "Сгенерированы секретные ключи для БД и JWT."