Closed anton-g closed 5 years ago
Hi Anton,
I'll have a look at it over the weekend since I already planned a new release.
Thanks Best Regards
I discovered that you can escape quotes by replacing them with "
, so maybe that could work here as well :)
Thanks for a great extension!
Hello anton, I've indeed used the htmlentity " and it seems it's working allright :)
We're also experiencing this issue in the Set or update an operation policy
task. Can you point me in the right direction here?
"
doesn't seem to work
Has the fix for this been released yet? We've tried using the "
but it's still not totally working.
Also getting the following errors. Is this an issue with my policy or an issue with the extension?
<set-variable name="x-sub" value="@(context.Request.Headers["Authorization"].First().Split(" ")[1].AsJwt()?.Claims["sub"].FirstOrDefault())" />
The set-variable tag is line 25. Error: @{code=ValidationError; target=set-variable; message=Error in element 'set-variable' on line 24, column 18: Argument 1: cannot convert from 'string' to 'char'}
<set-header name="SecurityId" exists-action="override">
<value>@((string)context.Variables["x-sub"])</value>
</set-header>
The opening set-header tag is line 27. Error: @{code=ValidationError; target=set-header; message=Error in element 'set-header' on line 27, column 18: Too many characters in character literal}
Hi @anton-g, @amyhre16 , @DavidFreetly,
If I copy paste the set backend url policy "as is", it works like a charm so, I can't reproduce the issue.
Best Regards
Hi!
We've run in to an issue when we wanted to use the policy template when creating/updating an API, but the policy contains a double quote ("). Since the extension replaces all " with ' in the policy it breaks when sending to APIM.
Maybe it would be better to escape the quotes instead of replacing them with single quotes, but I'm not a powershell guy so might be unaware of some limitation :)
Here is a very basic example policy: