From dde7da84ef970aaa1d1104e14d93771b25ef9b0a Mon Sep 17 00:00:00 2001 From: "m.epshtein" Date: Thu, 19 Dec 2024 18:29:02 +0300 Subject: [PATCH 01/25] new svg --- html/img/svg/fl.svg | 31 +++++++++++++------------------ html/img/svg/ul.svg | 25 +++++++++---------------- 2 files changed, 22 insertions(+), 34 deletions(-) diff --git a/html/img/svg/fl.svg b/html/img/svg/fl.svg index a197b6f..1ab6dfd 100644 --- a/html/img/svg/fl.svg +++ b/html/img/svg/fl.svg @@ -1,26 +1,21 @@ - - - - + + + + - - - - - - - - - + + + + + + + + - - - - + - diff --git a/html/img/svg/ul.svg b/html/img/svg/ul.svg index 305cc02..2ebaa04 100644 --- a/html/img/svg/ul.svg +++ b/html/img/svg/ul.svg @@ -1,17 +1,10 @@ - - - - - - - - - - - - - - - - + + + + + + + + + From 8c54df16ac42a1cd5fae186ef1171d1277b2a5cb Mon Sep 17 00:00:00 2001 From: Zaripov Emil Date: Thu, 26 Dec 2024 10:48:55 +0300 Subject: [PATCH 02/25] nginx.conf.template fix --- config/nginx.conf.template | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/config/nginx.conf.template b/config/nginx.conf.template index fdcae5d..b35ddad 100644 --- a/config/nginx.conf.template +++ b/config/nginx.conf.template @@ -55,6 +55,20 @@ server { index index.html; expires -1; + # Media: images, icons, video, audio, HTC + location ~* \.(?:jpg|jpeg|gif|png|ico|cur|gz|svg|svgz|mp4|mp3|ogg|ogv|webm|htc|woff2|woff|ttf)$ { + expires 1M; + access_log off; + # max-age must be in seconds + add_header Cache-Control "max-age=2629746, public"; + } + # CSS and Javascript + location ~* \.(?:css|js)$ { + expires 1y; + access_log off; + add_header Cache-Control "max-age=31556952, public"; + } + ssi on; set $flUrl "${LKRP_FL_URL}"; set $flLandingUrl "${LKRP_FL_LANDING}"; From cd0f6c87506d6f5bcd4d5f3bc1a62a032f5b0dcc Mon Sep 17 00:00:00 2001 From: Pavel Zilke Date: Mon, 13 Jan 2025 14:33:11 +0300 Subject: [PATCH 03/25] DEVOPS-1905 --- config/nginx.conf.template | 2 ++ nginx.conf | 60 -------------------------------------- 2 files changed, 2 insertions(+), 60 deletions(-) delete mode 100644 nginx.conf diff --git a/config/nginx.conf.template b/config/nginx.conf.template index b35ddad..acd5c2f 100644 --- a/config/nginx.conf.template +++ b/config/nginx.conf.template @@ -12,6 +12,8 @@ server { sendfile off; charset utf-8; + + server_tokens off; client_max_body_size 32m; diff --git a/nginx.conf b/nginx.conf deleted file mode 100644 index 3c91a64..0000000 --- a/nginx.conf +++ /dev/null @@ -1,60 +0,0 @@ -log_format nginx_main - '$remote_addr - $remote_user [$time_local] $request ' - '"$status" $body_bytes_sent "$http_referer" ' - '"$http_user_agent" "$http_x_forwarded_for" ' - '"$request_filename" "$gzip_ratio" $upstream_response_time server: $host : $document_root $fastcgi_script_name '; - -server { - listen 80 default; - - access_log /var/log/nginx/access.log nginx_main; - error_log /var/log/nginx/error.log error; - - sendfile off; - charset utf-8; - - client_max_body_size 32m; - - ## - # `gzip` Settings - # - # - gzip on; - gzip_disable "msie6"; - - gzip_vary on; - gzip_proxied any; - gzip_comp_level 6; - gzip_buffers 16 8k; - gzip_http_version 1.1; - gzip_min_length 256; - gzip_types - application/atom+xml - application/geo+json - application/javascript - application/x-javascript - application/json - application/ld+json - application/manifest+json - application/rdf+xml - application/rss+xml - application/xhtml+xml - application/xml - font/eot - font/otf - font/ttf - image/svg+xml - text/css - text/javascript - text/plain - text/xml; - - root /usr/share/nginx/html; - - location / { - index index.html; - expires -1; - try_files $uri $uri/ $uri/index.html; - } - -} From f3d00958b0dd82b8a94135b98986fa387945a7e4 Mon Sep 17 00:00:00 2001 From: Pavel Zilke Date: Mon, 13 Jan 2025 15:00:03 +0300 Subject: [PATCH 04/25] DEVOPS-1905 --- Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Dockerfile b/Dockerfile index e2de5fd..1859260 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,7 @@ FROM nginx:stable-alpine +RUN apk --update --no-cache add nginx-mod-http-headers-more + COPY config/nginx.conf.template /etc/nginx/templates/ COPY ./html/ /usr/share/nginx/html/ From 12abacea78d90e545d42a39c85a07ef5e1f2b823 Mon Sep 17 00:00:00 2001 From: kochetkov Date: Wed, 15 Jan 2025 14:54:21 +0300 Subject: [PATCH 05/25] csp fixes --- html/browser_check.js | 3 +++ html/index.html | 11 ++++++----- 2 files changed, 9 insertions(+), 5 deletions(-) create mode 100644 html/browser_check.js diff --git a/html/browser_check.js b/html/browser_check.js new file mode 100644 index 0000000..7c4532b --- /dev/null +++ b/html/browser_check.js @@ -0,0 +1,3 @@ +document.addEventListener("DOMContentLoaded", function(event) { + document.getElementById("browser-check-info").hidden = navigator.userAgent.indexOf("Chromium GOST") > -1 || navigator.userAgent.indexOf("YaBrowser") > -1; +}); diff --git a/html/index.html b/html/index.html index 9b929c0..c6078a0 100644 --- a/html/index.html +++ b/html/index.html @@ -4,6 +4,10 @@ + + + @@ -20,9 +24,6 @@ -
@@ -30,7 +31,7 @@
Для граждан
Проверить повестки на Ваше имя и получить выписку из Реестра можно в ">Личном кабинете
" class="btn">Подробнее -
+
Для организаций
@@ -42,4 +43,4 @@
- \ No newline at end of file + From d40d1d47d677848455e0dfd2bd1d0d0a5a601185 Mon Sep 17 00:00:00 2001 From: kochetkov Date: Wed, 15 Jan 2025 15:15:03 +0300 Subject: [PATCH 06/25] fixes from rtsk repos --- config/nginx.conf.template | 30 ++++++++++++++++-------------- html/index.html | 2 +- 2 files changed, 17 insertions(+), 15 deletions(-) diff --git a/config/nginx.conf.template b/config/nginx.conf.template index acd5c2f..2adac2d 100644 --- a/config/nginx.conf.template +++ b/config/nginx.conf.template @@ -12,7 +12,7 @@ server { sendfile off; charset utf-8; - + server_tokens off; client_max_body_size 32m; @@ -57,19 +57,21 @@ server { index index.html; expires -1; - # Media: images, icons, video, audio, HTC - location ~* \.(?:jpg|jpeg|gif|png|ico|cur|gz|svg|svgz|mp4|mp3|ogg|ogv|webm|htc|woff2|woff|ttf)$ { - expires 1M; - access_log off; - # max-age must be in seconds - add_header Cache-Control "max-age=2629746, public"; - } - # CSS and Javascript - location ~* \.(?:css|js)$ { - expires 1y; - access_log off; - add_header Cache-Control "max-age=31556952, public"; - } + add_header Content-Security-Policy "frame-ancestors 'none'; default-src 'self'; script-src 'self'; style-src 'unsafe-inline' 'self' data:; font-src 'self' data:; img-src 'self' data:;"; + + # Media: images, icons, video, audio, HTC + location ~* \.(?:jpg|jpeg|gif|png|ico|cur|gz|svg|svgz|mp4|mp3|ogg|ogv|webm|htc|woff2|woff|ttf)$ { + expires 1M; + access_log off; + # max-age must be in seconds + add_header Cache-Control "max-age=2629746, public"; + } + # CSS and Javascript + location ~* \.(?:css|js)$ { + expires 1y; + access_log off; + add_header Cache-Control "max-age=31556952, public"; + } ssi on; set $flUrl "${LKRP_FL_URL}"; diff --git a/html/index.html b/html/index.html index c6078a0..45e9a1d 100644 --- a/html/index.html +++ b/html/index.html @@ -13,7 +13,7 @@
-
Военный комиссариат Министерства обороны Российской Федерации
+
Реестр повесток Российской Федерации
From e3cb9ff5f24f94d25c462c4609a0301d6af00715 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A5=D0=B0=D0=BB=D1=82=D0=BE=D0=B1=D0=B8=D0=BD=20=D0=95?= =?UTF-8?q?=D0=B2=D0=B3=D0=B5=D0=BD=D0=B8=D0=B9?= Date: Mon, 20 Jan 2025 09:10:13 +0300 Subject: [PATCH 07/25] `update nginx version --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 1859260..9d0f482 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM nginx:stable-alpine +FROM nginx:1.26.2-alpine-slim RUN apk --update --no-cache add nginx-mod-http-headers-more From 14a38dfd50033b261a254932b5d9e1b17fee032c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A5=D0=B0=D0=BB=D1=82=D0=BE=D0=B1=D0=B8=D0=BD=20=D0=95?= =?UTF-8?q?=D0=B2=D0=B3=D0=B5=D0=BD=D0=B8=D0=B9?= Date: Mon, 20 Jan 2025 09:51:39 +0300 Subject: [PATCH 08/25] fix --- Dockerfile | 2 -- 1 file changed, 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 9d0f482..2251fe9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,5 @@ FROM nginx:1.26.2-alpine-slim -RUN apk --update --no-cache add nginx-mod-http-headers-more - COPY config/nginx.conf.template /etc/nginx/templates/ COPY ./html/ /usr/share/nginx/html/ From d482101edd94933519711a933f1459c28ac706a5 Mon Sep 17 00:00:00 2001 From: Alexandr Shalaginov Date: Fri, 11 Oct 2024 15:04:25 +0300 Subject: [PATCH 09/25] SUPPORT-8783: Fix --- Dockerfile | 5 +++-- html/browser_check.js | 3 --- html/css/inbox.css | 6 +++--- html/index.html | 10 +++++----- html/script/cert-checker.js | 9 +++++++++ readme.md | 3 ++- 6 files changed, 22 insertions(+), 14 deletions(-) delete mode 100644 html/browser_check.js create mode 100644 html/script/cert-checker.js diff --git a/Dockerfile b/Dockerfile index 2251fe9..2372ab3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,6 +4,7 @@ COPY config/nginx.conf.template /etc/nginx/templates/ COPY ./html/ /usr/share/nginx/html/ ENV LKRP_UL_URL="https://lkrp-dev.micord.ru/ul/" -ENV LKRP_UL_LANDING="https://lkrp-dev.micord.ru/ul/home.html" +ENV LKRP_UL_LANDING="https://lkrp-dev.micord.ru/ul/home" ENV LKRP_FL_URL="https://lkrp-dev.micord.ru/fl/" -ENV LKRP_FL_LANDING="https://lkrp-dev.micord.ru/fl/home.html" +ENV LKRP_FL_LANDING="https://lkrp-dev.micord.ru/fl/home" +ENV LKRP_CRT_CHECK_URL="https://www.sberbank.ru/" diff --git a/html/browser_check.js b/html/browser_check.js deleted file mode 100644 index 7c4532b..0000000 --- a/html/browser_check.js +++ /dev/null @@ -1,3 +0,0 @@ -document.addEventListener("DOMContentLoaded", function(event) { - document.getElementById("browser-check-info").hidden = navigator.userAgent.indexOf("Chromium GOST") > -1 || navigator.userAgent.indexOf("YaBrowser") > -1; -}); diff --git a/html/css/inbox.css b/html/css/inbox.css index 9ed93db..72631a2 100644 --- a/html/css/inbox.css +++ b/html/css/inbox.css @@ -232,17 +232,17 @@ a.btn:is(:hover, :focus, :active) { margin-top: var(--indent-medium); } -.browser-check-content { +.cert-check-content { font-family: 'Golos'; font-size: var(--size-text-secondary); padding: var(--indent-mini) var(--w-screen) var(--indent-mini) calc(var(--w-screen) + 38px); background-color: var(--bg-warn); } -.browser-check-text { +.cert-check-text { position: relative; padding-left: 40px; } -.browser-check-text::before { +.cert-check-text::before { position: absolute; content: url(../img/svg/info.svg); left: 0; diff --git a/html/index.html b/html/index.html index 45e9a1d..c8a1569 100644 --- a/html/index.html +++ b/html/index.html @@ -7,7 +7,7 @@ - + @@ -17,10 +17,10 @@
-
-
-
-
Для обеспечения защищённого соединения с сайтом реестра повесток необходимо установить браузер Яндекс или Chromium GOST.
+
+
+
+
Для обеспечения защищенного соединения с сайтом реестра повесток необходимо установить сертификат безопасности. Он размещен на официальном сайте Портала государственных услуг Российской Федерации. Для установки воспользуйтесь инструкцией
diff --git a/html/script/cert-checker.js b/html/script/cert-checker.js new file mode 100644 index 0000000..8255722 --- /dev/null +++ b/html/script/cert-checker.js @@ -0,0 +1,9 @@ +fetch("LKRP_CRT_CHECK_URL") + .then(() => { + document.getElementById("cert-check-info").hidden = true; + console.log("Success!"); + }) + .catch(() => { + document.getElementById("cert-check-info").hidden = false; + console.log("Error!"); + }); \ No newline at end of file diff --git a/readme.md b/readme.md index d92f049..59a9612 100644 --- a/readme.md +++ b/readme.md @@ -4,4 +4,5 @@ * LKRP_UL_URL - ссылка на личный кабинет юридического лица * LKRP_UL_LANDING - ссылка на главную страницу личного кабинета юридического лица * LKRP_FL_URL - ссылка на личный кабинет физического лица -* LKRP_FL_LANDING - ссылка на главную страницу личного кабинета физического лица \ No newline at end of file +* LKRP_FL_LANDING - ссылка на главную страницу личного кабинета физического лица +* LKRP_CRT_CHECK_URL - ссылка на ресурс с сертификатом, необходим для отображения уведомления установки сертификата для пользователя (обязательно должен обращаться по протоколу https) \ No newline at end of file From 512041d593fffaba1d4f7a552ecc3549b41d9ea3 Mon Sep 17 00:00:00 2001 From: Eduard Tihomirov Date: Fri, 24 Jan 2025 11:53:29 +0300 Subject: [PATCH 10/25] test --- Dockerfile | 4 ++-- html/script/cert-checker.js | 13 ++++++++----- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index 2372ab3..67534df 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,7 @@ COPY config/nginx.conf.template /etc/nginx/templates/ COPY ./html/ /usr/share/nginx/html/ ENV LKRP_UL_URL="https://lkrp-dev.micord.ru/ul/" -ENV LKRP_UL_LANDING="https://lkrp-dev.micord.ru/ul/home" +ENV LKRP_UL_LANDING="https://lkrp-dev.micord.ru/ul/#/home" ENV LKRP_FL_URL="https://lkrp-dev.micord.ru/fl/" -ENV LKRP_FL_LANDING="https://lkrp-dev.micord.ru/fl/home" +ENV LKRP_FL_LANDING="https://lkrp-dev.micord.ru/fl/#/home" ENV LKRP_CRT_CHECK_URL="https://www.sberbank.ru/" diff --git a/html/script/cert-checker.js b/html/script/cert-checker.js index 8255722..f6fdee1 100644 --- a/html/script/cert-checker.js +++ b/html/script/cert-checker.js @@ -1,9 +1,12 @@ -fetch("LKRP_CRT_CHECK_URL") - .then(() => { +fetch("https://www.sberbank.ru/") + .then((response) => { + if (!response.ok) { + throw new Error("Server responded with status " + response.status); + } document.getElementById("cert-check-info").hidden = true; - console.log("Success!"); + console.log("Success: Certificate check passed!"); }) - .catch(() => { + .catch((error) => { document.getElementById("cert-check-info").hidden = false; - console.log("Error!"); + console.error("Fetch error:", error.message || error); }); \ No newline at end of file From 66feed1f0106c168411dceedf73d6d8a530cd288 Mon Sep 17 00:00:00 2001 From: Eduard Tihomirov Date: Fri, 24 Jan 2025 15:31:58 +0300 Subject: [PATCH 11/25] SUPPORT-8783: Fix --- html/script/cert-checker.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/html/script/cert-checker.js b/html/script/cert-checker.js index f6fdee1..2203c36 100644 --- a/html/script/cert-checker.js +++ b/html/script/cert-checker.js @@ -1,4 +1,4 @@ -fetch("https://www.sberbank.ru/") +fetch("https://lkrp-dev2.micord.ru") .then((response) => { if (!response.ok) { throw new Error("Server responded with status " + response.status); From e3f0cab34237ad9bfc4c189fe7c468109c5e97bf Mon Sep 17 00:00:00 2001 From: Eduard Tihomirov Date: Fri, 24 Jan 2025 15:50:42 +0300 Subject: [PATCH 12/25] SUPPORT-8783: Fix --- config/nginx.conf.template | 2 +- html/index.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config/nginx.conf.template b/config/nginx.conf.template index 2adac2d..c5667a5 100644 --- a/config/nginx.conf.template +++ b/config/nginx.conf.template @@ -57,7 +57,7 @@ server { index index.html; expires -1; - add_header Content-Security-Policy "frame-ancestors 'none'; default-src 'self'; script-src 'self'; style-src 'unsafe-inline' 'self' data:; font-src 'self' data:; img-src 'self' data:;"; + add_header Content-Security-Policy "frame-ancestors 'none'; default-src 'self'; connect-src 'self' https; script-src 'self'; style-src 'unsafe-inline' 'self' data:; font-src 'self' data:; img-src 'self' data:;"; # Media: images, icons, video, audio, HTC location ~* \.(?:jpg|jpeg|gif|png|ico|cur|gz|svg|svgz|mp4|mp3|ogg|ogv|webm|htc|woff2|woff|ttf)$ { diff --git a/html/index.html b/html/index.html index c8a1569..67e8278 100644 --- a/html/index.html +++ b/html/index.html @@ -5,7 +5,7 @@ + content="default-src 'self'; connect-src 'self' https; script-src 'self'; style-src 'unsafe-inline' 'self' data:; font-src 'self' data:; img-src 'self' data:"/> From 8d22f4d75bb46b277ffda82a24540ac80f9ea0a4 Mon Sep 17 00:00:00 2001 From: Eduard Tihomirov Date: Fri, 24 Jan 2025 15:55:23 +0300 Subject: [PATCH 13/25] SUPPORT-8783: Fix --- config/nginx.conf.template | 2 +- html/index.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config/nginx.conf.template b/config/nginx.conf.template index c5667a5..6120092 100644 --- a/config/nginx.conf.template +++ b/config/nginx.conf.template @@ -57,7 +57,7 @@ server { index index.html; expires -1; - add_header Content-Security-Policy "frame-ancestors 'none'; default-src 'self'; connect-src 'self' https; script-src 'self'; style-src 'unsafe-inline' 'self' data:; font-src 'self' data:; img-src 'self' data:;"; + add_header Content-Security-Policy "frame-ancestors 'none'; default-src 'self'; connect-src 'self' https:; script-src 'self'; style-src 'unsafe-inline' 'self' data:; font-src 'self' data:; img-src 'self' data:;"; # Media: images, icons, video, audio, HTC location ~* \.(?:jpg|jpeg|gif|png|ico|cur|gz|svg|svgz|mp4|mp3|ogg|ogv|webm|htc|woff2|woff|ttf)$ { diff --git a/html/index.html b/html/index.html index 67e8278..f023838 100644 --- a/html/index.html +++ b/html/index.html @@ -5,7 +5,7 @@ + content="default-src 'self'; connect-src 'self' https:; script-src 'self'; style-src 'unsafe-inline' 'self' data:; font-src 'self' data:; img-src 'self' data:"/> From ff2a62efb0b035ff0a5c204ba4adec36bd66983e Mon Sep 17 00:00:00 2001 From: Eduard Tihomirov Date: Fri, 24 Jan 2025 16:21:15 +0300 Subject: [PATCH 14/25] SUPPORT-8783: Fix --- html/script/cert-checker.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/html/script/cert-checker.js b/html/script/cert-checker.js index 2203c36..51a659c 100644 --- a/html/script/cert-checker.js +++ b/html/script/cert-checker.js @@ -1,12 +1,10 @@ -fetch("https://lkrp-dev2.micord.ru") +fetch("https://lkrp-dev2.micord.ru", { mode: "no-cors" }) .then((response) => { if (!response.ok) { throw new Error("Server responded with status " + response.status); } document.getElementById("cert-check-info").hidden = true; - console.log("Success: Certificate check passed!"); }) .catch((error) => { - document.getElementById("cert-check-info").hidden = false; console.error("Fetch error:", error.message || error); }); \ No newline at end of file From 4249b277b256593667b4cf1b88f403db2b89e69d Mon Sep 17 00:00:00 2001 From: Eduard Tihomirov Date: Fri, 24 Jan 2025 16:29:47 +0300 Subject: [PATCH 15/25] SUPPORT-8783: Fix --- config/nginx.conf.template | 1 + html/index.html | 2 +- html/script/cert-checker.js | 26 ++++++++++++++++---------- 3 files changed, 18 insertions(+), 11 deletions(-) diff --git a/config/nginx.conf.template b/config/nginx.conf.template index 6120092..0d3e0ad 100644 --- a/config/nginx.conf.template +++ b/config/nginx.conf.template @@ -78,6 +78,7 @@ server { set $flLandingUrl "${LKRP_FL_LANDING}"; set $ulUrl "${LKRP_UL_URL}"; set $ulLandingUrl "${LKRP_UL_LANDING}"; + set $certUrl "${LKRP_CRT_CHECK_URL}"; try_files $uri $uri/ $uri/index.html; } diff --git a/html/index.html b/html/index.html index f023838..e3b5909 100644 --- a/html/index.html +++ b/html/index.html @@ -17,7 +17,7 @@
-
+
Для обеспечения защищенного соединения с сайтом реестра повесток необходимо установить сертификат безопасности. Он размещен на официальном сайте Портала государственных услуг Российской Федерации. Для установки воспользуйтесь инструкцией
diff --git a/html/script/cert-checker.js b/html/script/cert-checker.js index 51a659c..444366c 100644 --- a/html/script/cert-checker.js +++ b/html/script/cert-checker.js @@ -1,10 +1,16 @@ -fetch("https://lkrp-dev2.micord.ru", { mode: "no-cors" }) - .then((response) => { - if (!response.ok) { - throw new Error("Server responded with status " + response.status); - } - document.getElementById("cert-check-info").hidden = true; - }) - .catch((error) => { - console.error("Fetch error:", error.message || error); - }); \ No newline at end of file +document.addEventListener("DOMContentLoaded", () => { + // Получаем значение flLandingUrl из data-атрибута + const flLandingUrl = document.getElementById("cert-check-info").dataset.certUrl; + + // Выполняем fetch с использованием полученного URL + fetch(flLandingUrl, { mode: "no-cors" }) + .then((response) => { + if (!response.ok) { + throw new Error("Server responded with status " + response.status); + } + document.getElementById("cert-check-info").hidden = true; + }) + .catch((error) => { + console.error("Fetch error:", error.message || error); + }); +}); \ No newline at end of file From 1c0f899d84f00d01eac04a5a232413ef41f3b6b7 Mon Sep 17 00:00:00 2001 From: Eduard Tihomirov Date: Fri, 24 Jan 2025 16:34:52 +0300 Subject: [PATCH 16/25] SUPPORT-8783: Fix --- Dockerfile | 2 +- html/script/cert-checker.js | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 67534df..595ae71 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,4 +7,4 @@ ENV LKRP_UL_URL="https://lkrp-dev.micord.ru/ul/" ENV LKRP_UL_LANDING="https://lkrp-dev.micord.ru/ul/#/home" ENV LKRP_FL_URL="https://lkrp-dev.micord.ru/fl/" ENV LKRP_FL_LANDING="https://lkrp-dev.micord.ru/fl/#/home" -ENV LKRP_CRT_CHECK_URL="https://www.sberbank.ru/" +ENV LKRP_CRT_CHECK_URL="https://lkrp-dev2.micord.ru" diff --git a/html/script/cert-checker.js b/html/script/cert-checker.js index 444366c..021de6f 100644 --- a/html/script/cert-checker.js +++ b/html/script/cert-checker.js @@ -4,10 +4,7 @@ document.addEventListener("DOMContentLoaded", () => { // Выполняем fetch с использованием полученного URL fetch(flLandingUrl, { mode: "no-cors" }) - .then((response) => { - if (!response.ok) { - throw new Error("Server responded with status " + response.status); - } + .then(() => { document.getElementById("cert-check-info").hidden = true; }) .catch((error) => { From 02c335d24b2778cbc394cc1c31ae8bfd5eb88bec Mon Sep 17 00:00:00 2001 From: Eduard Tihomirov Date: Fri, 24 Jan 2025 16:38:02 +0300 Subject: [PATCH 17/25] SUPPORT-8783: Fix --- html/script/cert-checker.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/html/script/cert-checker.js b/html/script/cert-checker.js index 021de6f..20b648f 100644 --- a/html/script/cert-checker.js +++ b/html/script/cert-checker.js @@ -1,10 +1,11 @@ document.addEventListener("DOMContentLoaded", () => { // Получаем значение flLandingUrl из data-атрибута - const flLandingUrl = document.getElementById("cert-check-info").dataset.certUrl; + const certUrl = document.getElementById("cert-check-info").dataset.certUrl; // Выполняем fetch с использованием полученного URL - fetch(flLandingUrl, { mode: "no-cors" }) - .then(() => { + fetch(certUrl, { mode: "no-cors" }) + .then((response) => { + console.log(response); document.getElementById("cert-check-info").hidden = true; }) .catch((error) => { From 18f6663eabf387377d142ea26b70cb7ba2a9e2b7 Mon Sep 17 00:00:00 2001 From: Eduard Tihomirov Date: Fri, 24 Jan 2025 16:48:13 +0300 Subject: [PATCH 18/25] SUPPORT-8783: Fix --- html/script/cert-checker.js | 1 - 1 file changed, 1 deletion(-) diff --git a/html/script/cert-checker.js b/html/script/cert-checker.js index 20b648f..5e243ba 100644 --- a/html/script/cert-checker.js +++ b/html/script/cert-checker.js @@ -5,7 +5,6 @@ document.addEventListener("DOMContentLoaded", () => { // Выполняем fetch с использованием полученного URL fetch(certUrl, { mode: "no-cors" }) .then((response) => { - console.log(response); document.getElementById("cert-check-info").hidden = true; }) .catch((error) => { From 059070e7e2c71bc202b238cf73152612ac5c5e91 Mon Sep 17 00:00:00 2001 From: Eduard Tihomirov Date: Mon, 27 Jan 2025 13:36:19 +0300 Subject: [PATCH 19/25] SUPPORT-8783: Fix --- html/script/cert-checker.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/html/script/cert-checker.js b/html/script/cert-checker.js index 5e243ba..9b421ff 100644 --- a/html/script/cert-checker.js +++ b/html/script/cert-checker.js @@ -1,8 +1,5 @@ document.addEventListener("DOMContentLoaded", () => { - // Получаем значение flLandingUrl из data-атрибута const certUrl = document.getElementById("cert-check-info").dataset.certUrl; - - // Выполняем fetch с использованием полученного URL fetch(certUrl, { mode: "no-cors" }) .then((response) => { document.getElementById("cert-check-info").hidden = true; From 8acc397302cafb2df3145c9eb69507f5ce33fcc2 Mon Sep 17 00:00:00 2001 From: Eduard Tihomirov Date: Thu, 30 Jan 2025 15:21:11 +0300 Subject: [PATCH 20/25] SUPPORT-8783: Fix --- config/nginx.conf.template | 2 +- html/index.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config/nginx.conf.template b/config/nginx.conf.template index 0d3e0ad..88f5995 100644 --- a/config/nginx.conf.template +++ b/config/nginx.conf.template @@ -57,7 +57,7 @@ server { index index.html; expires -1; - add_header Content-Security-Policy "frame-ancestors 'none'; default-src 'self'; connect-src 'self' https:; script-src 'self'; style-src 'unsafe-inline' 'self' data:; font-src 'self' data:; img-src 'self' data:;"; + add_header Content-Security-Policy "frame-ancestors 'none'; default-src 'self'; connect-src 'self' https://www.sberbank.ru; script-src 'self'; style-src 'unsafe-inline' 'self' data:; font-src 'self' data:; img-src 'self' data:;"; # Media: images, icons, video, audio, HTC location ~* \.(?:jpg|jpeg|gif|png|ico|cur|gz|svg|svgz|mp4|mp3|ogg|ogv|webm|htc|woff2|woff|ttf)$ { diff --git a/html/index.html b/html/index.html index e3b5909..859c0b1 100644 --- a/html/index.html +++ b/html/index.html @@ -5,7 +5,7 @@ + content="default-src 'self'; connect-src 'self' https://www.sberbank.ru; script-src 'self'; style-src 'unsafe-inline' 'self' data:; font-src 'self' data:; img-src 'self' data:"/> From 6e8856484e7ca3d12204f84a8065621b4cd06eb6 Mon Sep 17 00:00:00 2001 From: Eduard Tihomirov Date: Thu, 27 Feb 2025 10:48:36 +0300 Subject: [PATCH 21/25] SUPPORT-8965: Fix --- Dockerfile | 2 +- config/nginx.conf.template | 2 +- html/index.html | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 595ae71..8cc7ab2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,4 +7,4 @@ ENV LKRP_UL_URL="https://lkrp-dev.micord.ru/ul/" ENV LKRP_UL_LANDING="https://lkrp-dev.micord.ru/ul/#/home" ENV LKRP_FL_URL="https://lkrp-dev.micord.ru/fl/" ENV LKRP_FL_LANDING="https://lkrp-dev.micord.ru/fl/#/home" -ENV LKRP_CRT_CHECK_URL="https://lkrp-dev2.micord.ru" +ENV LKRP_CRT_CHECK_URL="https://e-trust.gosuslugi.ru" diff --git a/config/nginx.conf.template b/config/nginx.conf.template index 88f5995..42b664b 100644 --- a/config/nginx.conf.template +++ b/config/nginx.conf.template @@ -57,7 +57,7 @@ server { index index.html; expires -1; - add_header Content-Security-Policy "frame-ancestors 'none'; default-src 'self'; connect-src 'self' https://www.sberbank.ru; script-src 'self'; style-src 'unsafe-inline' 'self' data:; font-src 'self' data:; img-src 'self' data:;"; + add_header Content-Security-Policy "frame-ancestors 'none'; default-src 'self'; connect-src 'self' https://e-trust.gosuslugi.ru; script-src 'self'; style-src 'unsafe-inline' 'self' data:; font-src 'self' data:; img-src 'self' data:;"; # Media: images, icons, video, audio, HTC location ~* \.(?:jpg|jpeg|gif|png|ico|cur|gz|svg|svgz|mp4|mp3|ogg|ogv|webm|htc|woff2|woff|ttf)$ { diff --git a/html/index.html b/html/index.html index 859c0b1..70687c0 100644 --- a/html/index.html +++ b/html/index.html @@ -5,7 +5,7 @@ + content="default-src 'self'; connect-src 'self' https://e-trust.gosuslugi.ru; script-src 'self'; style-src 'unsafe-inline' 'self' data:; font-src 'self' data:; img-src 'self' data:"/> From 045ce1ae2c340af2caf5eab5ae0f4a29e2fc367c Mon Sep 17 00:00:00 2001 From: Pavel Zilke Date: Wed, 12 Mar 2025 17:06:42 +0300 Subject: [PATCH 22/25] DEVOPS-1974 real IP in nginx log --- config/nginx.conf.template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/nginx.conf.template b/config/nginx.conf.template index 88f5995..5550670 100644 --- a/config/nginx.conf.template +++ b/config/nginx.conf.template @@ -1,5 +1,5 @@ log_format nginx_main - '$remote_addr - $remote_user [$time_local] $request ' + '$http_x_real_ip - $remote_user [$time_local] $request ' '"$status" $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for" ' '"$request_filename" "$gzip_ratio" $upstream_response_time server: $host : $document_root $fastcgi_script_name '; From 2528204f40f3cb1462bf8beb06a9deaedec34a35 Mon Sep 17 00:00:00 2001 From: Eduard Tihomirov Date: Thu, 13 Mar 2025 16:11:10 +0300 Subject: [PATCH 23/25] SUPPORT-8965: Fix --- Dockerfile | 2 +- config/nginx.conf.template | 2 +- html/index.html | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 8cc7ab2..9098a36 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,4 +7,4 @@ ENV LKRP_UL_URL="https://lkrp-dev.micord.ru/ul/" ENV LKRP_UL_LANDING="https://lkrp-dev.micord.ru/ul/#/home" ENV LKRP_FL_URL="https://lkrp-dev.micord.ru/fl/" ENV LKRP_FL_LANDING="https://lkrp-dev.micord.ru/fl/#/home" -ENV LKRP_CRT_CHECK_URL="https://e-trust.gosuslugi.ru" +ENV LKRP_CRT_CHECK_URL="https://xn--1-6tb.xn--b1afabzvcegckfhg.xn--p1ai/" diff --git a/config/nginx.conf.template b/config/nginx.conf.template index 42b664b..27d44b5 100644 --- a/config/nginx.conf.template +++ b/config/nginx.conf.template @@ -57,7 +57,7 @@ server { index index.html; expires -1; - add_header Content-Security-Policy "frame-ancestors 'none'; default-src 'self'; connect-src 'self' https://e-trust.gosuslugi.ru; script-src 'self'; style-src 'unsafe-inline' 'self' data:; font-src 'self' data:; img-src 'self' data:;"; + add_header Content-Security-Policy "frame-ancestors 'none'; default-src 'self'; connect-src 'self' http://xn--1-6tb.xn--b1afabzvcegckfhg.xn--p1ai/ https://xn--2-6tb.xn--b1afbulhcegckfhg.xn--p1ai/; script-src 'self'; style-src 'unsafe-inline' 'self' data:; font-src 'self' data:; img-src 'self' data:;"; # Media: images, icons, video, audio, HTC location ~* \.(?:jpg|jpeg|gif|png|ico|cur|gz|svg|svgz|mp4|mp3|ogg|ogv|webm|htc|woff2|woff|ttf)$ { diff --git a/html/index.html b/html/index.html index 70687c0..c01988b 100644 --- a/html/index.html +++ b/html/index.html @@ -5,7 +5,7 @@ + content="default-src 'self'; connect-src 'self' http://xn--1-6tb.xn--b1afabzvcegckfhg.xn--p1ai/ https://xn--2-6tb.xn--b1afbulhcegckfhg.xn--p1ai/; script-src 'self'; style-src 'unsafe-inline' 'self' data:; font-src 'self' data:; img-src 'self' data:"/> From 4f5e31c5f190dfa5cf7a6b5741113c264b77f888 Mon Sep 17 00:00:00 2001 From: Eduard Tihomirov Date: Mon, 17 Mar 2025 11:08:06 +0300 Subject: [PATCH 24/25] fix --- html/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/html/index.html b/html/index.html index c01988b..0d580bd 100644 --- a/html/index.html +++ b/html/index.html @@ -5,7 +5,7 @@ + content="default-src 'self'; connect-src 'self' https://xn--1-6tb.xn--b1afabzvcegckfhg.xn--p1ai/ https://xn--2-6tb.xn--b1afbulhcegckfhg.xn--p1ai/; script-src 'self'; style-src 'unsafe-inline' 'self' data:; font-src 'self' data:; img-src 'self' data:"/> From 985be85873c1f3b80d1a2929947533b257349a54 Mon Sep 17 00:00:00 2001 From: Eduard Tihomirov Date: Mon, 17 Mar 2025 11:17:40 +0300 Subject: [PATCH 25/25] fix --- config/nginx.conf.template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/nginx.conf.template b/config/nginx.conf.template index 581e146..fa3eeab 100644 --- a/config/nginx.conf.template +++ b/config/nginx.conf.template @@ -57,7 +57,7 @@ server { index index.html; expires -1; - add_header Content-Security-Policy "frame-ancestors 'none'; default-src 'self'; connect-src 'self' http://xn--1-6tb.xn--b1afabzvcegckfhg.xn--p1ai/ https://xn--2-6tb.xn--b1afbulhcegckfhg.xn--p1ai/; script-src 'self'; style-src 'unsafe-inline' 'self' data:; font-src 'self' data:; img-src 'self' data:;"; + add_header Content-Security-Policy "frame-ancestors 'none'; default-src 'self'; connect-src 'self' https://xn--1-6tb.xn--b1afabzvcegckfhg.xn--p1ai/ https://xn--2-6tb.xn--b1afbulhcegckfhg.xn--p1ai/; script-src 'self'; style-src 'unsafe-inline' 'self' data:; font-src 'self' data:; img-src 'self' data:;"; # Media: images, icons, video, audio, HTC location ~* \.(?:jpg|jpeg|gif|png|ico|cur|gz|svg|svgz|mp4|mp3|ogg|ogv|webm|htc|woff2|woff|ttf)$ {