BIP329: Use application/jsonl as MIME type (#5489)

There's an [ongoing discussion](https://github.com/wardi/jsonlines/issues/19) about what the MIME type for [JSONL](https://jsonlines.org/) files should be. Making it `application/jsonl` leads to the file being downloaded according to my testing, which prevents browsers from opening them in a new window and parsing them as JSON, which fixes #5488.
This commit is contained in:
d11n
2023-11-20 02:46:36 +01:00
committed by GitHub
parent 2fb72d5aa6
commit dd62e166a1
2 changed files with 6 additions and 11 deletions

View File

@@ -1348,7 +1348,7 @@ namespace BTCPayServer.Controllers
{
"csv" => "text/csv",
"json" => "application/json",
"bip329" => "text/jsonl", // https://stackoverflow.com/questions/59938644/what-is-the-mime-type-of-jsonl-files
"bip329" => "application/jsonl", // Ongoing discussion: https://github.com/wardi/jsonlines/issues/19
_ => throw new ArgumentOutOfRangeException(nameof(format), format, null)
};
var cd = new ContentDisposition