別に影響ないんだけど、Googleサーチコンソールで毎回「サイトマップがHTMLです。」っていうエラー出ててうるさいな〜と思ってたのでついに実行したというお話。
Content-Type: text/xml じゃだめなのかなーと思って
Headers Moreモジュール
nginx-fullが入っていれば、nginx.confに
load_module /usr/local/libexec/nginx/ngx_http_headers_more_filter_module.so;
を追加して、あとは変更したいところで
more_set_headers 'Content-Type: application/xml';
を追記するだけ
![ビフォー](/resize/620x620/fcontents/abc/original/article_block_image/14/スクリーンショット 2023-12-14 14.58.52_1.png)
![アフター](/resize/620x620/fcontents/abc/original/article_block_image/14/スクリーンショット 2023-12-14 15.19.26.png)