-
Notifications
You must be signed in to change notification settings - Fork 187
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
how to change pusher host to connect to /broadcasting/auth on a different domain? #189
Comments
I think this must be a bug because after I did
It does show my custom host.. yet it ignores that host and uses the current domain instead Finally I found a way to force it to use the domain I want by doing this:
|
When you instantiate echo you can pass in It looks like every configuration is passed down towards the underlaying Pusher configuration instance. PusherConnector Constructor. echo/src/connector/pusher-connector.ts Line 33 in bf93673
Echo constructor. Line 45 in bf93673
Here is a list of possible Pusher specific configuration keys: So just do it that way. :) |
Can you try @morloderex's solution to see if that works? |
just add it to the config
|
@lukasz-madon on next version you can use window.Echo = new Echo({
broadcaster: 'pusher',
authEndpoint: `https://xxxx/broadcasting/auth`,
cluster: 'us3',
forceTLS: true,
bearerToken: jwt,
/*auth: {
headers: {
Authorization: 'Bearer ' + jwt
},
},*/
}); |
I'm still having this issue, even by using direclty authEndPoint, it doesn't affect my configuration at all, anything on this has been updated ? I can't make it work on different domains. |
My vue site is https://www.xxx.com
and my Laravel api is https://api.xxx.com
I use Laravel Echo with Pusher and it always wants to use https://www.xxx.com/broadcasting/auth to join my channels.
I need it to be https://api.xxx.com/broadcasting/auth
I have jwt.auth and cors working correctly already, but no matter what I do, setting the host, wsHost or httpHost, it doesn't respect my setting. It ignores it completely if I change the 'host' and if I set the wsHost/httpHost it then tries to connect to a /pusher/app url with lots of url parameters and doesn't try to connect to /broadcasting/auth anymore
It was working fine when both the laravel backend and vue front-end was on the same domain.. but now that I decoupled them I can't get it to change the host
I'm really stuck here.. some help would be so appreciated!
The text was updated successfully, but these errors were encountered: