go-learn/apps/web/public/.htaccess
sab.code.lab 1c85091186 chore: восстановление репозитория из снапшота v0.3.1
Прежняя git-история утрачена при переносе проекта на машину владельца
(снапшот без .git). Хэши коммитов в docs/reports/* относятся к утраченной
истории.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-07 09:34:02 +02:00

37 lines
1.6 KiB
ApacheConf
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Статический сайт на Apache shared hosting (ADR-0001).
#
# HTTPS-редиректа в этом файле НЕТ и быть не должно: включать только
# панелью хостинга. Проверка HTTPS через mod_rewrite за SSL-прокси хостера
# даёт вечный цикл редиректов (gotcha-https-redirect-proxy).
Options -Indexes
DirectoryIndex index.html
# MIME для WASM (нужен движку, этап 9): без него потоковая компиляция
# WebAssembly.instantiateStreaming не стартует.
AddType application/wasm .wasm
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/html text/css application/javascript application/json image/svg+xml
</IfModule>
<IfModule mod_expires.c>
ExpiresActive On
# Прочее (картинки, шрифты, favicon) — час.
ExpiresDefault "access 1 hour"
# HTML без хэша в имени — всегда перепроверять (Cache-Control ниже).
ExpiresByType text/html "access 0 seconds"
# Ассеты /_astro/ с хэшем в имени — год (Cache-Control immutable ниже).
ExpiresByType text/css "access 1 year"
ExpiresByType application/javascript "access 1 year"
</IfModule>
<IfModule mod_headers.c>
<FilesMatch "\.html$">
Header set Cache-Control "no-cache, must-revalidate"
</FilesMatch>
# Имена ассетов Astro содержат хэш: _astro/<имя>.<хэш>.<css|js>.
<FilesMatch "\.[0-9A-Za-z_-]{8,}\.(css|js)$">
Header set Cache-Control "public, max-age=31536000, immutable"
</FilesMatch>
</IfModule>