Unable to start working with mercury and apiplatform3. However, my configuration is basic. (wsl2 / debian) I kept the basic configuration to be able to start.
#api/.env
MERCURE_JWT_SECRET="WExxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxN6P"
#api/config/packages/mercures.yaml
mercure:
enable_profiler: '%kernel.debug%'
hubs:
default:
url: '%env(MERCURE_URL)%'
public_url: '%env(MERCURE_PUBLIC_URL)%'
jwt:
secret: '%env(MERCURE_JWT_SECRET)%'
publish: '*'
#[Route('/mercure/test', name: 'mercure', methods: ['GET'])]
public function mercure(HubInterface $hub): Response
{
$hub->publish(new Update("https://xxxxxxxxxxxxx.fr/mercure/test",
json_encode(['status' => 'OutOfStock'])
));
return new Response('published!');
}
I get an error : failed: SSL certificate problem: unable to get local issuer certificate for "https://caddy/.well-known/mercure/.well-known/mercure"