I mean, this is how I'd describe the issue myself (attached image).
I don't know all the HTTPS terms, but because there's a reverse-proxy, Music Assistant isn't seeing the "HTTPS" in my URL, it's using the "HTTP" from the localhost address that nginx-proxy-manager is proxying from.
The important piece of this PR is fixing fastmcp to look at the URL I'm using, not the proxied URL by X-Forwarded-Proto.
What that is? I have no clue. But that's the thing that I saw in NGINX-proxy-manager (attached image). I have it disabled, but Music Assistant MCP wasn't honoring that.
There's a "guard" thing in the code that the MCP server uses to avoid minting tokens in an unsafe way. But because my URL is HTTPS, then it should be fine even if the origin is localhost.
I understand that much. I just don't know python. I understand code, I understand comments, I understand the generalities of HTTPS.
I have absolutely no clue what X-Forwarded-Proto nor X-Forwarded-Scheme are and how they're related to proxies, but I know that those things are related to why this broke.
What I'd like help with is the Python. Some spots in the code a suspect such as how it's splitting the headers (attached image). I don't have a good way to explain why that is or isn't good.