fix: sitemap.xmlのContent-Typeを application/xml; charset=utf-8 に明示 (v8.5.9-a)
Helm Chart Release / release-chart (push) Successful in 7s

標準のmime.typesでは .xml が text/xml 扱いとなりcharsetが付与されず、
ブラウザやGoogle Search Consoleなどのツールが正しく解釈できない
場合があった。

templates/configmap.yaml のnginx設定に location = /sitemap.xml を
追加し、types {} + default_type で明示的にContent-Typeを指定する
ようにした。静的ファイルの場合のみ有効(PHP動的生成には別途
header()指定が必要)。設定不要・常時有効。

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-06 22:14:31 +09:00
co-authored by Claude Fable 5
parent 1be71b95e4
commit e27f02992f
5 changed files with 55 additions and 1 deletions
+9
View File
@@ -55,6 +55,15 @@ data:
root /var/www/html;
index index.php index.html index.htm;
# sitemap.xml のContent-Typeを明示的に指定
# 標準のmime.typesでは .xml は text/xml 扱いでcharsetが付かず、
# ブラウザやSearch Consoleが正しく解釈できない場合があるため
location = /sitemap.xml {
types { }
default_type "application/xml; charset=utf-8";
try_files $uri =404;
}
location / {
try_files $uri $uri/ /index.php?$query_string;
}