Merge branch 'develop' of 10.10.31.70:/ervu-lkrp-landing into develop

This commit is contained in:
m.epshtein 2025-04-11 11:17:41 +03:00
commit a8b764ff9e
9 changed files with 72 additions and 112 deletions

View file

@ -1,9 +1,10 @@
FROM nginx:stable-alpine
FROM nginx:1.26.2-alpine-slim
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://xn--1-6tb.xn--b1afabzvcegckfhg.xn--p1ai/"

View file

@ -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 ';
@ -13,6 +13,8 @@ server {
sendfile off;
charset utf-8;
server_tokens off;
client_max_body_size 32m;
##
@ -55,11 +57,28 @@ server {
index index.html;
expires -1;
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)$ {
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}";
set $ulUrl "${LKRP_UL_URL}";
set $ulLandingUrl "${LKRP_UL_LANDING}";
set $certUrl "${LKRP_CRT_CHECK_URL}";
try_files $uri $uri/ $uri/index.html;
}

View file

@ -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;

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 3.6 MiB

After

Width:  |  Height:  |  Size: 3.3 KiB

Before After
Before After

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 3.6 MiB

After

Width:  |  Height:  |  Size: 4.6 KiB

Before After
Before After

View file

@ -4,25 +4,26 @@
<link rel="stylesheet" type="text/css" href="css/inbox.css">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Security-Policy"
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:"/>
<meta name="referrer" content="strict-origin-when-cross-origin"/>
<script src="script/cert-checker.js"></script>
</head>
<body>
<div class="header">
<div class="header-logo"></div>
<div class="header-title">Военный комиссариат Министерства обороны Российской Федерации</div>
<div class="header-title">Реестр повесток Российской Федерации</div>
</div>
<div class="container">
<div id="browser-check-info">
<div class="browser-check-content">
<div class="browser-check-text">
<div class="plain-text">Для обеспечения защищённого соединения с сайтом реестра повесток необходимо установить браузер Яндекс или Chromium GOST.</div>
<div id="cert-check-info" data-cert-url="<!--#echo var='certUrl'-->">
<div class="cert-check-content">
<div class="cert-check-text">
<div class="plain-text">Для обеспечения защищенного соединения с сайтом реестра повесток необходимо установить сертификат безопасности. Он размещен на официальном сайте Портала государственных услуг Российской Федерации. Для установки воспользуйтесь <a href="https://www.gosuslugi.ru/crt/">инструкцией</a></div>
</div>
</div>
</div>
<script>
document.getElementById("browser-check-info").hidden = navigator.userAgent.indexOf("Chromium GOST") > -1 || navigator.userAgent.indexOf("YaBrowser") > -1;
</script>
<div class="container-inside">
<div class="block-group">
<div class="block block-fl">

View file

@ -0,0 +1,10 @@
document.addEventListener("DOMContentLoaded", () => {
const certUrl = document.getElementById("cert-check-info").dataset.certUrl;
fetch(certUrl, { mode: "no-cors" })
.then((response) => {
document.getElementById("cert-check-info").hidden = true;
})
.catch((error) => {
console.error("Fetch error:", error.message || error);
});
});

View file

@ -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;
}
}

View file

@ -5,3 +5,4 @@
* LKRP_UL_LANDING - ссылка на главную страницу личного кабинета юридического лица
* LKRP_FL_URL - ссылка на личный кабинет физического лица
* LKRP_FL_LANDING - ссылка на главную страницу личного кабинета физического лица
* LKRP_CRT_CHECK_URL - ссылка на ресурс с сертификатом, необходим для отображения уведомления установки сертификата для пользователя (обязательно должен обращаться по протоколу https)