Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reflect proxy website into the project and website #205

Open
Surdok opened this issue Dec 31, 2024 · 7 comments
Open

Reflect proxy website into the project and website #205

Surdok opened this issue Dec 31, 2024 · 7 comments

Comments

@Surdok
Copy link

Surdok commented Dec 31, 2024

Is your feature request related to a problem? Please describe.

I'm trying to have the server to run behind a proxy. Where I would have my domain at example.com/nuget that would load for me the website alongside the proper requests and everything.

image

Mainly this is fine, but when it comes to the .json that gets produced, it's showing the wrong url :
image

which won't load the packages info properly :

image

Describe the solution you'd like

What I want is to have the proxy domain to be correctly reflected in the url that is getting used throughout the website.

Describe alternatives you've considered

I will consider directly opening ports from our AWS Ec2 machine to our development subnet to connect directly to the nuget server

Additional context

I'm trying to make development nuget packages that will be only distributed among our development team. Currently there is a complication to where I shall privatly host them. I'm trying to host them on our on-prem servers and AWS Ec2 Machines, but this requires a long process of approvals and all. So that's why I considered utilizing an already opened port, that all of my dev team has access to, and load nuget website by proxying a directory to the nuget website.

@Regenhardt
Copy link

Make sure the reverse proxy properly forwards headers, as the links are generated using the Host header from the request.

@Regenhardt
Copy link

Not sure how well this applies to you, but here's an example of someone configuring nginx: #143 (comment)

@Surdok
Copy link
Author

Surdok commented Dec 31, 2024

Okay thanks for mentioning it. I have already went through and checked that issue, the problem is that I'm using IIS as reverse proxy, as my port-opened port happens to be a legacy ASP.net webforms application hosted on IIS.

I have tried configuring URL rewrites, but with no luck.

Is there any form or way that I can modify the Host Header for each request sent?

@Regenhardt
Copy link

Pretty sure there is a way, as I feel like I've had this problem before, I just don't remember. How do you have your IIS site configured to work as reverse proxy, which module does that?

@Regenhardt
Copy link

I read that X-Forwarded-Host is the header conventionally set by a proxy, and also read by ASP.NET to decide on the host value used, so I guess that is what you're actually looking for.

@Surdok
Copy link
Author

Surdok commented Jan 2, 2025

Pretty sure there is a way, as I feel like I've had this problem before, I just don't remember. How do you have your IIS site configured to work as reverse proxy, which module does that?

I'm using URL Rewrite from IIS to rewrite the access of a virtual directory, within my main website, to rewrite the url into localhost:5544

@Regenhardt
Copy link

This guy had the exact opposite problem, rewriting the URL but it didn't change the host header lol, maybe you can compare his config to yours and see if there's anythin extra in yours that changes the host header?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants