Azure / static-web-apps

Azure Static Web Apps. For bugs and feature requests, please create an issue in this repo. For community discussions, latest updates, kindly refer to the Discussions Tab. To know what's new in Static Web Apps, visit https://aka.ms/swa/ThisMonth
https://aka.ms/swa
MIT License
322 stars 54 forks source link

Failed to add an app setting named AzureWebJobsFeatureFlags constrained by Azure Static Web App while required to re-enable proxy #1009

Open jiaojiaoxia opened 1 year ago

jiaojiaoxia commented 1 year ago

Hi All,

I have an azure static app with self-managed api in .netcore3.1 in which a proxy has been defined.

After migrating to net6 and v4 azure function, the proxy stopped working.

By checking Mircosoft documentation, a flag named AzureWebJobsFeatureFlags can enable proxy functionalities. However, azure static web app doesn't allow to add an app setting has name prefix using AzureWeb.

https://learn.microsoft.com/en-us/azure/azure-functions/legacy-proxies#re-enable-proxies-in-functions-v4x

Could anyone provide a solution or a workaround?

Much appreciates for any hits.

Thanks, Jiaojiao

scale-tone commented 1 year ago

Experiencing the same with a typescript-based API.

Surprisingly, I now have

So both instances do not work.

@thomasgauvin ?..

sulabh-msft commented 1 year ago

Adding @Reshmi-Sriram to take the issue/discussion forward.

Reshmi-Sriram commented 1 year ago

Hey all, In order to enable proxies, you can add SWA_ENABLE_PROXIES_MANAGED_FUNCTIONS to true in your application settings. Doc link.