StaticFileOptions.OnPrepareResponseAsync プロパティ

定義

ステータス コードとヘッダーが設定された後、本文が書き込まれる前に呼び出されます。 これを使って応答ヘッダーを追加したり変更したりすることができます。

public Func<Microsoft.AspNetCore.StaticFiles.StaticFileResponseContext,System.Threading.Tasks.Task> OnPrepareResponseAsync { get; set; }
member this.OnPrepareResponseAsync : Func<Microsoft.AspNetCore.StaticFiles.StaticFileResponseContext, System.Threading.Tasks.Task> with get, set
Public Property OnPrepareResponseAsync As Func(Of StaticFileResponseContext, Task)

プロパティ値

注釈

OnPrepareResponse は の前に OnPrepareResponseAsync呼び出されます。

適用対象