私のHangfire DashboardのAuthroizationFilterを作成する必要があります。OWINを使用してアプリケーションのローカルサーバーからリクエストが届いていますか。
Azure VM上で動作し、設計上、ローカル要求からの要求のみを受け入れる必要があります。
Webアプリケーションが実行されているのと同じVM上のWebブラウザからの要求のみを検証するAuthorizationFilterを作成します。
私はこのフォームOwinContext決定する必要があります: - 要求のコンテキストでヘッダをチェックについて
public class MyRestrictiveAuthorizationFilter : IAuthorizationFilter
{
public bool Authorize(IDictionary<string, object> owinEnvironment)
{
// In case you need an OWIN context, use the next line,
// `OwinContext` class is the part of the `Microsoft.Owin` package.
var context = new OwinContext(owinEnvironment);
// Allow all local request to see the Dashboard
return true;
}
}