public RequireSslOptions(WebAppSettings webAppSettings)
 {
     this.Scheme             = "https";
     this.Port               = 443;
     this.RedirectStatusCode = 301;
     // require SSL in Azure web apps by default
     this.Enabled = "PortalRequireSsl".ResolveAppSetting().ToBoolean().GetValueOrDefault(webAppSettings.AzureWebAppEnabled);
 }
예제 #2
0
 public static void UsePortalBus <TMessage>(this IAppBuilder app, WebAppSettings webAppSettings, EventHubJobSettings eventHubJobSettings)
 {
     if (webAppSettings.AzureWebRoleEnabled)
     {
         UseRoleEnvironmentPortalBus(app, new ServiceDefinitionPortalBusOptions <TMessage>());
     }
     else if (webAppSettings.AppDataCachingEnabled && !eventHubJobSettings.IsEnabled)
     {
         UseAppDataPortalBus(app, new AppDataPortalBusOptions <TMessage>(webAppSettings));
     }
     else
     {
         UseLocalOnlyPortalBus <TMessage>(app);
     }
 }