Правки различные

This commit is contained in:
mi
2026-08-26 11:05:32 +03:00
parent c1e49fb15d
commit 728b9826a3
36 changed files with 722 additions and 1986 deletions
+2 -1
View File
@@ -7,9 +7,10 @@ RUN apt-get update \
COPY nginx.conf.template /etc/nginx/templates-src/nginx.conf.template
COPY templates /etc/nginx/templates-src/sites
COPY snippets /etc/nginx/snippets
COPY static /etc/nginx/static
COPY scripts/entrypoint.sh /usr/local/bin/han-nginx-entrypoint
RUN sed -i 's/\r$//' /usr/local/bin/han-nginx-entrypoint \
&& /bin/sh -n /usr/local/bin/han-nginx-entrypoint \
&& chmod 0555 /usr/local/bin/han-nginx-entrypoint \
&& find /etc/nginx/templates-src /etc/nginx/snippets -type f -exec chmod 0444 {} +
&& find /etc/nginx/templates-src /etc/nginx/snippets /etc/nginx/static -type f -exec chmod 0444 {} +
ENTRYPOINT ["/usr/local/bin/han-nginx-entrypoint"]
@@ -0,0 +1,46 @@
<!DOCTYPE html>
<html lang="ru">
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>HAN Chat</title>
<style>
body {
margin: 0;
min-height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 16px;
padding: 32px 24px;
background: #fff;
color: #252525;
font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
text-align: center;
}
p { margin: 0; line-height: 1.5; }
a {
display: inline-flex;
align-items: center;
justify-content: center;
min-width: 220px;
height: 56px;
padding: 0 24px;
border-radius: 12px;
background: #030213;
color: #fff;
font-size: 15px;
font-weight: 500;
text-decoration: none;
}
</style>
</head>
<body>
<p>Вход выполнен. Возвращаем в приложение…</p>
<p>
<a id="han-open-app" href="han-chat://auth/callbackHAN_CALLBACK_QUERY">Открыть HAN Chat</a>
</p>
<script src="/mobile/oidc/callback.js"></script>
</body>
</html>
@@ -0,0 +1,6 @@
(function () {
var target = "han-chat://auth/callback" + window.location.search + window.location.hash;
var link = document.getElementById("han-open-app");
if (link) link.href = target;
window.location.replace(target);
})();
@@ -139,6 +139,23 @@ server {
add_header Cache-Control "no-cache";
include /etc/nginx/generated/security-headers.conf;
}
location = /mobile/oidc/callback {
default_type text/html;
charset utf-8;
alias /etc/nginx/static/mobile-oidc-callback.html;
sub_filter_once on;
sub_filter_types text/html;
sub_filter HAN_CALLBACK_QUERY ?$args;
add_header Cache-Control "no-store" always;
include /etc/nginx/generated/security-headers.conf;
}
location = /mobile/oidc/callback.js {
default_type text/javascript;
charset utf-8;
alias /etc/nginx/static/mobile-oidc-callback.js;
add_header Cache-Control "no-store" always;
include /etc/nginx/generated/security-headers.conf;
}
location ^~ /auth/resources/ {
include /etc/nginx/snippets/proxy-keycloak.conf;
proxy_pass http://keycloak_upstream;