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 呼叫 。

適用於