# AzureContainerAppEnvironmentResource.WithHttpsUpgrade

- Module: [Aspire.Hosting.Azure.AppContainers](/reference/api/go/aspire.hosting.azure.appcontainers.md)
- Defined on: [AzureContainerAppEnvironmentResource](/reference/api/go/aspire.hosting.azure.appcontainers/azurecontainerappenvironmentresource.md)
- Version: `17.0.0`
- Kind: `method`

Configures whether HTTP endpoints should be upgraded to HTTPS in Azure Container Apps. 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 Container Apps.
Note that explicit ports specified for development (e.g., port 8080) are still normalized
to standard ports (80/443) as required by Azure Container Apps.
Disabling HTTPS upgrade for an Express environment is rejected during publishing or deployment.

## Definition

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

## Signature

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

## 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

[`AzureContainerAppEnvironmentResource`](/reference/api/go/aspire.hosting.azure.appcontainers/azurecontainerappenvironmentresource.md) -- The resource builder.

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

## Defined on

- [AzureContainerAppEnvironmentResource](/reference/api/go/aspire.hosting.azure.appcontainers/azurecontainerappenvironmentresource.md) -- `handle`
