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

Redirect does not check Proxy #3820

Open
2 tasks done
koehdaniel opened this issue Jan 16, 2025 · 1 comment
Open
2 tasks done

Redirect does not check Proxy #3820

koehdaniel opened this issue Jan 16, 2025 · 1 comment
Assignees
Labels
bug Something isn't working module-proxy

Comments

@koehdaniel
Copy link

koehdaniel commented Jan 16, 2025

I have checked the following:

  • I use the newest version of bruno.
  • I've searched existing issues and found nothing related to my issue.

Describe the bug

I am requesting a site that is excluded from the Proxy by setting the "Proxy Bypass" in the settings.
That site then sends a 302 Found-Redirect to a URL that needs a Proxy.
The automatic redirect from Bruno does not use a Proxy for the redirected Request and results in a timeout.

Test Setup:

I am expecting this Test to fail, since the redirected URL should use the invalid Proxy.
The test will pass which shows, that the Proxy is not used for the redirected Request to objects.githubusercontent.com

.bru file to reproduce the bug

Test-Case:

meta {
  name: TestRedirect
  type: http
  seq: 1
}

get {
  url: https://github.com/usebruno/bruno/releases/download/v1.38.1/latest.yml
  body: none
  auth: none
}

Proxy-Config:

"proxy": {
   "enabled": true,
   "protocol": "http",
   "hostname": "invalid-proxy",
   "port": 1234,
   "auth": {
     "enabled": false,
     "username": "",
     "password": ""
   },
   "bypassProxy": "github.com"
 }

Screenshots/Live demo link

Image

Image

@koehdaniel koehdaniel added the bug Something isn't working label Jan 16, 2025
@koehdaniel
Copy link
Author

fyi: I used a workaround to get this working for me in my reallife scenario.
The first requests uses req.setMaxRedirects(0); to fetch the URL from the header "location" and stores it in a variable.
Then there is a second request that uses the URL previously stored in the variable.
Now bruno successfully uses the Proxy for objects.githubusercontent.com.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working module-proxy
Projects
None yet
Development

No branches or pull requests

4 participants