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

Proxy reverse to Google returns "404. That's an error." #7

Closed
silvioprog opened this issue Jan 22, 2021 · 4 comments
Closed

Proxy reverse to Google returns "404. That's an error." #7

silvioprog opened this issue Jan 22, 2021 · 4 comments

Comments

@silvioprog
Copy link
Contributor

Hi.

Consider the following configuration:

server {
  listen 8080
  proxy {
    url http://www.google.com$`path`$`query`
  }
}

If you try to access the URL http://localhost:8080/?q=Rust from your browser, it will show the following error:


image


but it should show the correct Google page, like using reverse proxy in Nginx.

cheers

@wyhaya
Copy link
Owner

wyhaya commented Jan 23, 2021

@silvioprog
This should be an issue with the proxy request header host, I will fix it as soon as possible. Thank you for your report!

@wyhaya
Copy link
Owner

wyhaya commented Jan 24, 2021

Sorry, I did not find this problem, can you try again? I think even if there is a problem, it should be 400 and not 404.

@silvioprog
Copy link
Contributor Author

No problem dude, some Google erros make no sense haha. 😅 The small change below uses a site from our company (using nginx/1.19.6):

server {
  listen 8080
  proxy {
    url https://aproveita.app.br$`path`$`query`
  }
}

It may return 400 Bad Request.

@silvioprog
Copy link
Contributor Author

Fixed by 8e9369a.

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

No branches or pull requests

2 participants