@Shreyas Rastogi , Thanks for posting this question.
Just to highlight, the “Front Ends” that act as load balancers to the application(s) running behind them have a hard upper limit of 64KB for total request header sizes.
The Front End configuration is not able to be changed. This means that although the application side can be changed (as discussed below), and depending on the server running the application - may have a various default total header size limit, but in all cases, the upper limit will always only be 64KB in size.
Python and Linux App Services uses Gunicorn to help run wSGI based applications on Azure. Therefore configuring allowed request header sizes would be done on Gunicorn itself.
In the Azure Portal go to your App Service and choose Configuration -> General Settings and then add gunicorn --bind 0.0.0.0:8000 --timeout 600 app:app --limit-request-field_size 64000
to the Startup Command field. This example sets allowed header sizes to 64KB.
Change app:app
to reflect your wSGI variable name and file name that contains the wSGI module.
This general approach using Gunicorn and passing –limit-request-field_size would work for most wSGI applications on Python and App Service Linux.
Reference: Increasing Request Header sizes on Linux App Services