Closed ManoloAMD closed 1 year ago
Can you show the body of the response you get please? If you could provide a repo containing a minimal reproducer, this would help a lot!
Ok right now I have a lot of work, I will do it soon
Basically, it looks like you don't hit the Mercure hub but an HTML page.
sorry I'm busy right now, maybe soon I'll clone the issue.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Hi excelent work guys,
Sorry for my english, i need help in deploy config please, i don't khown if have a bug or error in my config nginx, in my log Developer Tools i see this error:
EventSource's response has a MIME type ("text/html") that is not "text/event-stream". Aborting the connection.
I read many issues but I did not find a solution.
Symfony 5.4.9 Ionic Angular 6.20.3 symfony/mercure-bundle 0.3.5
My template (nginx docker) server { listen 80 default_server; servername ; return 301 https://my-domain.es; }
server { listen 443 ssl default_server; server_name ${NGINX_DOMAIN_TEST}; root /var/www/api-project/public; ssl_protocols TLSv1.3; ssl_prefer_server_ciphers on; ssl_certificate /etc/ssl/certs/my-cert.es.chained.crt; ssl_certificate_key /etc/ssl/private/my-key.es.key;
}
My .ts (ionic angular) subscribeEventSource() { const url = new URL('https://my-domain.es/.well-known/mercure');
}
My controller
[Route("/show/chat/{id}", name: "chat_show")]
public function showChat( Request $request, Room $room, MessageRepository $messageRepository, SerializerInterface $serializer ): Response { $host = $this->toolsService->getHost(); $messages = $messageRepository->findBy( [ "room" => $room, ], ["created_at" => "ASC"] );
}
Run in device android - log DevTools :
Config docker-compose mercure:
Config docker-compose-override mercure:
Questions: Is there something you need to do to implement mercure-container on a server? Why no documentation of deploy in prod only localhost?
Thanks :)