Negate bool app setting in Azure Function Proxies

143 Views Asked by At

I've got a bool app setting in my Azure Function called show_not_available_page:

"show_not_available_page": true

Depending on this setting I want to disable and enable proxy paths in proxies.json, e. g.:

"root": {
            "disabled": "%show_not_available_page%",
            ...
        },

This works fine but what I need additionally is a negation of the app setting value, something like "disabled": "NOT%show_not_available_page%"

Is there a way to trigger the proxy paths with one app setting or do I need to add two app settings with opposite values?

1

There are 1 best solutions below

0
MatterOfFact On

After having contacted the Microsoft support, the answer is: It is not possible to change (negate) app setting values for the proxy.json. That's why keep the workaround with two opposite app setting values:

"show_not_available_page": true,

"hide_not_available_page": false:

"root": {
            "disabled": "%show_not_available_page%",
            ...
        },
"notavailable": {
            "disabled: "%hide_not_available_page%",
            ...
        }