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

Proxying always goes to the root #1073

Closed
JorisVanEijden opened this issue Mar 1, 2024 · 1 comment
Closed

Proxying always goes to the root #1073

JorisVanEijden opened this issue Mar 1, 2024 · 1 comment
Assignees
Labels

Comments

@JorisVanEijden
Copy link

JorisVanEijden commented Mar 1, 2024

Describe the bug

ProxyAndRecordSettings.Url = "https://www.example.com/some/sub/paths"

A request for "/someurl" is proxied to "https://www.example.com/someurl"

Expected behavior:

A request for "/someurl" is proxied to "https://www.example.com/some/sub/paths/someurl"

Other related info

The path to proxy to is determined by var proxyUriWithRequestPathAndQuery = new Uri(proxyUri, requestUri.PathAndQuery);
Since requestUri.PathAndQuery will always start with a slash, the created uri will always only take the root of the proxyUri and ignore the sub paths.

*edit: A workaround:

ReplaceSettings = new ProxyUrlReplaceSettings
{
  OldValue = "example.com/",
  NewValue = "example.com/some/sub/paths/",
}
@StefH StefH self-assigned this Mar 2, 2024
@StefH StefH added question and removed bug labels Mar 2, 2024
@StefH StefH closed this as completed Mar 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants