You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It should be possible to provide the value of an ARM expression to enable_cors in the functions builder.
Currently doing so results in an exception
Unhandled exception. System.UriFormatException: Invalid URI: The format of the URI could not be determined.
at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind, UriCreationOptions& creationOptions)
at System.Uri..ctor(String uriString)
at Farmer.Builders.WebApp.Extensions.IServicePlanApp-1-EnableCors@874.Invoke(String arg00)
at Microsoft.FSharp.Primitives.Basics.List.map[T,TResult](FSharpFunc`2 mapping, FSharpList`1 x) in D:\a\_work\1\s\src\fsharp\FSharp.Core\local.fs:line 244
at Farmer.Builders.WebApp.Extensions.IServicePlanApp`1.EnableCors[T](IServicePlanApp`1 this, T state, FSharpList`1 origins)
Setting aside my use-case of linking a deployment script to a function app, the same exception can be replicated very simply by just trying to get Farmer to build the ARM template for a function app where the CORS value is determined by a script.
Suppose I write a simple string in the CORS section of the function app builder,
enable_cors [ "https://anywhere.co" ]
the relevant section of the template will compile to:
It should be possible to provide the value of an ARM expression to
enable_cors
in thefunctions
builder.Currently doing so results in an exception
I would like to do something along the lines of:
where
getWebsiteUrl
is a deployment script that obtains the web address of the deployed static website:Setting aside my use-case of linking a deployment script to a function app, the same exception can be replicated very simply by just trying to get Farmer to build the ARM template for a function app where the CORS value is determined by a script.
Suppose I write a simple string in the CORS section of the function app builder,
the relevant section of the template will compile to:
If we take the output of that and then edit the template, substituting in a simple ARM expression in place of the URL:
this will evaluate and deploy fine.
Trying to do the same with:
in Farmer just results in it failing to generate the ARM template and returning the exception pasted above.
The text was updated successfully, but these errors were encountered: