www
All checks were successful
Deploy sts / deploy-sber (push) Successful in 1m43s

This commit is contained in:
2026-08-04 15:57:56 +05:00
parent 00cf2ebd9a
commit 5fa29fd33d
2 changed files with 24 additions and 4 deletions

View File

@@ -743,10 +743,7 @@ img { max-width: 100%; display: block; }
<section class="hero" id="hero">
<div class="hero-bg"><img src="./img/hero-bg.webp" alt="" fetchpriority="high"></div>
<div class="container">
<h1 style="position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0">Демонтаж трубопроводов и утилизация отходов по всей России</h1>
<div class="hero-content" id="heroContent"></div>
</div>
<div class="container"><div class="hero-content" id="heroContent"></div></div>
</section>
<section class="section section-alt" id="about">

View File

@@ -6,6 +6,29 @@ const sharp = require('sharp');
require('dotenv').config();
const app = express();
app.use((req, res, next) => {
const proto = req.headers['x-forwarded-proto'];
if (proto && proto !== 'https') {
return res.redirect(301, 'https://' + req.headers.host + req.url);
}
next();
});
app.use((req, res, next) => {
const host = req.hostname;
if (host.startsWith('www.')) {
const target = host.replace(/^www\./, '');
return res.redirect(301, 'https://' + target + req.originalUrl);
}
next();
});
app.use((req, res, next) => {
res.setHeader('Strict-Transport-Security', 'max-age=31536000; includeSubDomains; preload');
next();
});
const PORT = process.env.PORT || 3000;
const API_KEY = process.env.HOTEL777KEY;
if (!API_KEY) {