hsntngr
10 months ago
143
12
Servers

Browsers displays sitemap as plain text

Posted 10 months ago by hsntngr

I'm trying to display my sitemaps. Browsers display my sitemap index as xml but treat post sitemaps as plain text.

I tried to override content type with below configuration but it didn't help.

location ~ \.xml$ {
    proxy_hide_header Content-Type;
    add_header Content-Type "application/xml";
}

How do I force nginx to set content type as "application/xml" ?

sitemap index = https://gamercortex.com/sitemap.xml sitemap1 = https://www.gamercortex.com/sitemaps/sitemap-1.xml

How can I fix this ?

Please sign in or create an account to participate in this conversation.