# WithHttpsUpgrade

- Module: [Aspire.Hosting.Azure.AppContainers](/reference/api/go/aspire.hosting.azure.appcontainers.md)
- Version: `17.0.0`
- Kind: `method`
- Defined on: [`AzureContainerAppEnvironmentResource`](/reference/api/go/aspire.hosting.azure.appcontainers/azurecontainerappenvironmentresource.md)
- Source: [GitHub](https://github.com/microsoft/aspire/tree/bcfa151cdca6d0a573f22d5d9c23f9c727cb3b2f)

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
func (AzureContainerAppEnvironmentResource) 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()`.

## Applies to

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