No, not really. There is no part of the HTTP protocol where the server is expected to list headers it is interested in. It's not common practice for servers to do either - I have never seen anything like that anywhere.
You could guess the name or try to brute force it. But unless the name is obvious, you are very unlikely to succeed since the brute force has to be done online, one HTTP request per guess.
If you have access to the source code (or even the binaries) that the server is running, you could find the answer there. Or perhaps some leaked documentation or social engineering could provide you with this information.
So if there is no obvious way to exploit this, does it mean that a bypass like that is a secure thing? Absolutely not. Expect your source code to be leaked. Secrets should be separate from source code, and easily replaced. A hardcoded backdoor like that is the opposite.
I don't know if you were considering making one. But please don't.