-
Notifications
You must be signed in to change notification settings - Fork 84
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 Websocket and global error handler #53
Comments
Hi @mburger81, |
Hi @afrad My hope was, you could help us implementing this things or perhaps do you have already done some of this things in some of your projects, because I think it is not necessary implementing this, we could also resolve this using a dedicated service, observable or something like that. |
Some news? |
HI @afrad, I'm still waiting for some news about it. |
Just create PRs accordingly. We will merge them. |
I think this FR doesn't make sense, because you never can proxy WebSocket like a http request doing something like that @afrad right? |
I know this is not a issue but I don't know how I can ask you something.
We are using your websocket in an ionic2 project and it's working great.
There are three things we like to do.
this is how we implemented it for regular http requests
We configure a proxy in our ionic configuration for /api which is working only in dev mode so all HTTP requests where redirected and there is no CORS problem, we found no solution to proxy also Websockt requests. Do you have an idea=
We created a CustomHTTP Interceptor which is used instead of the regular HTTP, this checks if environment is dev or production, if dev we leave the url as it is, in dev mode means /api/ which will be redirect by proxy configuration, if we are in production I change the url to https.... or an other url, it depend if we are on a device or on a browser.
With this interceptor also we can handle http errors and log them.
So we need to do the same thing with your websocket implementation. Did you do something like that before? do you have some examples or some ideas to share with us? We can also open an stack-overflow to discuss this.!
thx for you help
The text was updated successfully, but these errors were encountered: