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 via proxy server #2648

Open
1 task done
vgoklani opened this issue Jan 4, 2023 · 1 comment
Open
1 task done

Redirect via proxy server #2648

vgoklani opened this issue Jan 4, 2023 · 1 comment

Comments

@vgoklani
Copy link

vgoklani commented Jan 4, 2023

Is there an existing issue for this?

  • I have searched the existing issues

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

We need to redirect traffic, but want the redirects to run via a proxy server.

Describe the solution you'd like

return response.redirect(some_url, proxy_path=...)

Additional context

All good; I <3 sanic

@sjsadowski
Copy link
Contributor

Could you clarify what you're actually looking to do?

This already exists within sanic: https://sanic.readthedocs.io/en/stable/sanic/api/core.html#sanic.response.redirect

Actually controlling the behavior of a proxy server is outside of scope of sanic, however you could, I suppose, write a passthrough method. Then you're proxying sanic to the proxy server to return a response which is very meta.

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