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

dynamic proxy target #70

Open
iteamaster89 opened this issue Jun 5, 2020 · 6 comments
Open

dynamic proxy target #70

iteamaster89 opened this issue Jun 5, 2020 · 6 comments

Comments

@iteamaster89
Copy link

No description provided.

@iteamaster89
Copy link
Author

Hi. Could anybody help to know how to toggle between proxies from the app if it's possible? For example, to have checkbox on page which toggles proxies from prod to dev mode.

Copy link
Member

atinux commented Jan 29, 2021

I don't think this is possible since it is set at runtime, what would be the use-case @iteamaster89 ?

@pi0 pi0 changed the title Toggle between proxies dynamic proxy target Feb 1, 2021
@davydnorris
Copy link

I was just looking for a similar thing!

I am building an app to analyse another system, and need to use the other system's REST API to get configuration details. I want to be able to enter the remote system's URL and authentication details at run time and then use axios to pull the data, and I'm getting CORS errors, as expected.

It looks like axios/proxy won't let me do this? Everything is set at dev time?

@mindfullsilence
Copy link

Also looking to do this. I have a multi-tenant application built in laravel which I would like to proxy the api for (esp. using nuxt/auth-next package).

Each tenant has their own api subdomain (someuser.example.com/api), so the login form has 3 fields: domain, email, password. The target of the proxy needs to reflect what the user inputs in the domain field (obviously after sanitizing/validating).

@greabock
Copy link

greabock commented Jul 5, 2021

@mindfullsilence did you found any solution?

@kairyou
Copy link

kairyou commented Nov 18, 2021

The http-proxy-middleware gives the option of re-target option.target for specific requests.
option.router

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

6 participants