In Python Runtime of App Service Linux, Gunicorn is placed behind Nginx and Flask is installed as standard.
Please refer to the following.
You should try to install the application using this first.
You can also customize the middleware by calling a custom script that initializes the middleware settings during the App Service startup process.
You can try this out and try a custom container if you need more flexibility.