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

'broadcasting/auth' - XMLHttpRequest issue for flutter for web app - how fix? #146

Open
FetFrumos opened this issue Feb 8, 2024 · 1 comment

Comments

@FetFrumos
Copy link

I wrote my own chat using pusher-channels-flutter. It was quite difficult - now it works - but there is a problem.
The architecture is as follows:

  • mobile application flutter
  • web app -flutter for web
  • between them the Laravel server part

it all works when i run web app with the "--disable-web-security" flag. Otherwise, I get a 403 error when request "broadcasting/auth" - I see the following message in the console.
:53050/#/login:1 Access to XMLHttpRequest at 'https://site.com/broadcasting/auth' from origin 'http://localhost:53050' has been blocked by CORS policy: Request header field authorization is not allowed by Access-Control-Allow-Headers in preflight response.

I set up CORS on the server - very loyal rules
if I use postman - the query works without problems. How can this be fixed? Any advice I'd appreciate - this problem has taken a long time.

@Princewil
Copy link

Hi dear,

I dont have the solution to the issue raised (I'm sorry), but I have a question. I would love to know if your chat worked well for mobile?
This is in reference to the issue I raised #144 that is yet to be resolved. If yes, could you pls share a snippet of your code.
I am also using Laravel server.
Thanks.

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