# AzureAppServiceEnvironmentResource.WithHttpsUpgrade

- Module: [Aspire.Hosting.Azure.AppService](/reference/api/go/aspire.hosting.azure.appservice.md)
- Defined on: [AzureAppServiceEnvironmentResource](/reference/api/go/aspire.hosting.azure.appservice/azureappserviceenvironmentresource.md)
- Version: `17.0.0`
- Kind: `method`

Configures whether HTTP endpoints should be automatically upgraded to HTTPS for the Azure App Service environment. By default, HTTP endpoints are upgraded to HTTPS for security and WebSocket compatibility.

## Remarks

When disabled (`false`), HTTP endpoints will use HTTP scheme and port 80 in Azure App Service.
Note that Azure App Service forces HTTP to HTTPS redirects at the platform level,
so disabling upgrade primarily affects connection strings generated for dependent resources.

## Definition

```go
type AzureAppServiceEnvironmentResource interface {
    // ... omitted for brevity
    WithHttpsUpgrade(options ...*WithHttpsUpgradeOptions) AzureAppServiceEnvironmentResource
}
```

## Signature

```go
WithHttpsUpgrade(options ...*WithHttpsUpgradeOptions) AzureAppServiceEnvironmentResource
```

## Parameters

- `options` (`...*WithHttpsUpgradeOptions`) -- optional settings, see [Options](#options)

## Options

Optional parameters are passed in a trailing `options ...*WithHttpsUpgradeOptions` argument.

- `Upgrade` (`*bool`) -- Whether to upgrade HTTP endpoints to HTTPS. Default is true.

## Returns

[`AzureAppServiceEnvironmentResource`](/reference/api/go/aspire.hosting.azure.appservice/azureappserviceenvironmentresource.md) -- The resource builder.

Returns a handle; failures surface later via `Err()`.

## Defined on

- [AzureAppServiceEnvironmentResource](/reference/api/go/aspire.hosting.azure.appservice/azureappserviceenvironmentresource.md) -- `handle`
