Skip to content

Commit

Permalink
Disabling proxies in Flex Consumption
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiocav committed May 2, 2024
1 parent c39a082 commit 3dc33ec
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions release_notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@
- Update Node.js Worker Version to [3.10.0](https://github.com/Azure/azure-functions-nodejs-worker/releases/tag/v3.10.0) (#9999)
- Update PowerShell worker 7.2 to [4.0.3220](https://github.com/Azure/azure-functions-powershell-worker/releases/tag/v4.0.3220)
- Update PowerShell worker 7.4 to [4.0.3219](https://github.com/Azure/azure-functions-powershell-worker/releases/tag/v4.0.3219)
- Ensuring proxies are disabled, with a warning, when running in Flex Consumption.
6 changes: 6 additions & 0 deletions src/WebJobs.Script/Host/ProxyFunctionProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@ public ProxyFunctionProvider(IOptions<ScriptJobHostOptions> scriptOptions, IEnvi
_logger = loggerFactory.CreateLogger(LogCategories.Startup);
if (_environment.IsProxiesEnabled())
{
if (_environment.IsFlexConsumptionSku())
{
_logger.LogWarning("Proxies are not supported in Flex Consumption. Proxy definitions will be ignored.");
return;
}

// note these are both null-checked; if they're left null (disabled) - that's fine
_metadata = new Lazy<ImmutableArray<FunctionMetadata>>(LoadFunctionMetadata);

Expand Down

0 comments on commit 3dc33ec

Please sign in to comment.