X-Forwarded-Proto is a hop-by-hop header; we are supposed to overwrite it at every hop, since it represents the protocol used at the last hop.
But since it’s not standardized, there’s no formal rule about it… all I can find is this: X-Forwarded-Proto - HTTP | MDN
So the user should probably configure that header explicitly if it needs to be a certain value.