Questions tagged [mercure]

Mercure is a protocol allowing to push data updates to web browsers and other HTTP clients. Mercure Hub is a reference implementation of the protocol.

Mercure is a protocol allowing to push data updates to web browsers and other HTTP clients. Mercure Hub is a reference implementation of the protocol. See the Mercure GitHub project page for more details.

101 questions
1
vote
0 answers

mercure symfony and Caddy server not working

I have installed Caddy in my CentOS 7 then I have downloaded the latest mercure that uses Caddy. I tried to run mercure using the below command: /usr/bin/caddy run --environ --config Caddyfile. The Caddyfile has the following config: # Learn how to…
Dev Dev
  • 314
  • 4
  • 17
1
vote
0 answers

Mercure doesn't update DELETE method when use SoftDeleatable extensions

For a project, I use Api Platform and Mercure. I currently have a problem with the SoftDeleatable extension. Without this extension, when I delete an entity, Mercure receives the DELETE. But if I use the SoftDeleatable extension, the deletion is…
Lucas
  • 38
  • 3
1
vote
0 answers

Issue using Mercure Hub

I am having some issues with my NotificationService on my UAT environment, but, oddly, this is working fine on my local server. $ php7 bin/console cache:clear In DefinitionErrorExceptionPass.php line 54: Cannot autowire service…
Loenix
  • 1,057
  • 1
  • 10
  • 23
1
vote
0 answers

How to install mercure in Symfony project?

I am trying to implment Symfony Mercure in my local environment. I am following official documentation https://symfony.com/doc/current/mercure.html So accordingly I downloaded binary from link…
nas
  • 2,289
  • 5
  • 32
  • 67
1
vote
0 answers

Mercure hub behind Nginx reverse proxy

I try to deploy a Mercure hub on a server. There is already a Symfony app (REST API) served with Apache2 (and Nginx configured in reverse proxy). My idea is to keep the API proxy to Apache2 and configure the Mercure subscriptions to be forwarded to…
Rubix
  • 43
  • 7
1
vote
2 answers

Why pushing update to Mercure Hub with PublisherInterface throw a TransferException?

I'm using Mercure Hub in a Docker container on my windows machine. I've got a Symfony application and I want to use the Mercure bundle to push messages to clients. /** * @Route("/message", name="sendMessage", methods={"POST"}) */ public function…
ceet
  • 21
  • 3
1
vote
1 answer

how to pass MERCURE_EXTRA_DIRECTIVES as enviroment directivei in docker-compose.yml

the new (0.11) mercure configuration grouped all extra directive into a single environment variable. I'm trying to set it via docker-compose.yml but I don't know if it's possible: environment: MERCURE_PUBLISHER_JWT_KEY: /docker/public.pem …
Dani
  • 14,639
  • 11
  • 62
  • 110
1
vote
0 answers

How to migrate mercure.rocks legacy configuration to new Caddy Server based configuration

I have a symfony mercure.rocks based chat application, and im trying to switch from old legacy mercure.rocks configuration to new caddy server hub configuration. i tired few methods to make it work, but for some reason i could not still make it…
Joseph Miller
  • 171
  • 2
  • 10
1
vote
1 answer

mercure docker cannot configure properly problem with CORS

I try for a bunch of hours to configure my mercure with docker I didn't manage to solve the corss issue : has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource I have this docker-compose…
user2626210
  • 115
  • 5
  • 13
1
vote
2 answers

Observable updates UI only once

I am fairly new to Angular (10) and try to grasp the concept of Observables. I have a Service and a Component, the services fills an array with participants and the component is supposed to display them Service export class MercureService { …
PrimuS
  • 2,505
  • 6
  • 33
  • 66
1
vote
0 answers

Problem using the API Mercure with Symfony

Here is the error message : Argument 1 passed to App\Controller\PublisherController::index() must be an instance of Symfony\Component\Mercure\Publisher, instance of Symfony\Component\Mercure\Debug\TraceablePublisher given, called in…
Zahreddine Laidi
  • 560
  • 1
  • 7
  • 20
1
vote
1 answer

Symfony 5 / Mercure > Private update. Fetch CORS

I try to integrate Mercure to symfony 5 project. And there are two trouble. I try to send update to private, but it's not work, but if try to send to not private everything works. Command that run mercure: ./bin/mercure…
1
vote
1 answer

Api Platform Mercure Private Updates Use same JWT for subscribing to Mercure as for User authentication

So I have an Api Platform application with JWT authentication using LexikJWTAuthenticatorBundle. So my users already have a JWT used to authenticate. Can I somehow use this same JWT to authenticate them for private updates on the Mercure hub? I am…
Raress96
  • 214
  • 3
  • 7
1
vote
1 answer

Symfony Mercure : EventSource don't send cookie

With Symfony Mercure, I want to send a cookie authorization : Symfony server : https://127.0.0.1:8000/ Mercure Hub : http://localhost:3000/.well-known/mercure I start my Mercure server with this command : mercure/mercure.exe…
Gaylord.P
  • 1,539
  • 2
  • 24
  • 54
1
vote
3 answers

JWT key for mercure

I try generate JWT key for Mercure settings I use this manual https://medium.com/@stefan.poeltl/instant-realtime-notifications-with-symfony-and-mercure-e45270f7c8a5 for pass myJWTKey JWT is…
Developer
  • 2,731
  • 2
  • 41
  • 71