Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.
If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!
[ProGet] Invalid URI when accessing feed
-
I run proget behind reverse-proxy. And that proxy sits on non-standard port.
And all works fine, but when I'm trying to access feed through browser it fails with Server Error 500:Invalid URI: The hostname could not be parsed
.If I run proget on non-standard port without reverse-proxy feed access works.
Looks like when proxy sets headerX-Forwarded-Host
to something with explicit port, it fails.
e.g.www.testdomain.com:82
.I found out that
X-Forwarded-Host
header is not very well defined in the case of ports. But I think proget shouldn't throw exceptions in this scenario and show feed page.There is a workaround to set
Web.BaseUrl
, but its not suitable for me, because port may change over time. And I dont want to changeWeb.BaseUrl
every time it changes.
-
Hi @pariv_0352,
What version of ProGet are you using?
Perhaps this is related to this:
https://forums.inedo.com/topic/3596/proget-2022-6-the-hostname-could-not-be-parsedDean
-
I use
Version 2023.9
. And yes, I saw that thread, but looks like it is a bit different.
-
Hi @pariv_0352,
Thanks for clarifying; looking closer, ProGet requires that
X-Forwarded-Host
is simply a hostname. You're right, there is no "standard" for this, but that's what ProGet does for the time being.. and if the input is invalid, then you get the error you'll see.I would change your reverse-proxy header configuration to:
X-Forwarded-Host: www.testdomain.com
X-Forwarded-Port: 82
Hope that helps,
Steve