デフォルトのContent-Typeをnginxで上書きする方法はありますか?現在、私は01.daeファイルを要求するとき、nginxに特定のContent-Typeを送信させます
Content-Type: application/octet-stream;
がありますそして、私は私が
location ~* \.dae$ {
types { };
default_type application/xml;
}
と
location ~* \.dae$ {
add_header Content-Type application/xml;
}
のようなものを試してみましたが、それは
Content-Type: application/xml;
になりたいです何も動作しません。
_default_type_ディレクティブは機能するはずですが、ブラウザのキャッシュを消去するか、コンテンツを強制的にリロードする必要があります(Chromeの[開発ツール/ネットワーク]タブの[キャッシュを無効にする])。それ以外の場合、サーバーは_304 Not Modified_を返します。 – stan