i have a symfony app and i'm using Mercure.
To run Mercure i use this command
SERVER_NAME=:3000 MERCURE_PUBLISHER_JWT_KEY='something' MERCURE_SUBSCRIBER_JWT_KEY='something' CORS_ALLOWED_ORIGINS=https://my-domain.cz ALLOW_ANONYMOUS=1 ./mercure run -config Caddyfile
I have installed SSL certificate from Let's encrypt authority. My apache:
<VirtualHost *:80>
....
ProxyRequests off
<LocationMatch /mercure>
ProxyPass http://localhost:3000
ProxyPassReverse http://localhost:3000
...
RewriteCond %{SERVER_NAME} =my-domain.cz
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
Issue. When i'm trying to subscribe some topic a receive this error
GET https://my-domain.cz:3000/.well-known/mercure?topic=someGoodTopic net::ERR_SSL_PROTOCOL_ERROR
If i will try to get this URL from browser i will get the same issue, but if i will try to use http:// everything will be OK, but unfortunately i can't make request for http from my https domain.
(Mixed Content: The page at 'https://my-domain.cz/' was loaded over HTTPS, but requested an insecure EventSource endpoint 'http://my-domain.cz:3000/.well-known/mercure?topic=someGoodTopic'. This request has been blocked; the content must be served over HTTPS.)
I will be glad if someone can help me =)