You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add the secrets and other settings to the Compose file:
app/compose.yaml
mercure:
image: dunglas/mercure:v0.19environment:
SERVER_NAME: ":80"MERCURE_PUBLISHER_JWT_KEY: ${MERCURE_PUBLISHER_JWT_KEY:?} # Required even if unusedMERCURE_SUBSCRIBER_JWT_KEY: ${MERCURE_SUBSCRIBER_JWT_KEY:?} # Required even if unusedMERCURE_CORS_ALLOWED_ORIGINS: "*"# Sets CORS Access-Control-Allow-Origin for all requestsMERCURE_PUBLISH_ALLOWED_ORIGINS: "http://postgres"# Restricts which origins can send POST (publish)# MERCURE_ANONYMOUS: "1" # Allow public subscribing - does not work for meMERCURE_EXTRA_DIRECTIVES: anonymous # Works
Caddy
Add a route for subscribing:
app/caddy/Caddyfile
# Allow subscribing to /jobsroute/jobs* {
@sse method GET
reverse_proxy@sse mercure:80 respond@sse"Invalid method" 405
}