Netlify dev request protocol is incorrectly set to https

I noticed another user reported facing a similar issue with netlify edge functions and has the same workaround of setting the header x-forwarded-proto.
Still believe that these issues with both regular serverless function and edge function will be resolved if netlify dev proxy intelligently ( and correctly ) sets the value of x-forwarded-proto. I am referring to the below post.