Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: add proxy_buffering off to Nginx example for SSL proxy compatibility #1005

Merged
merged 1 commit into from
Feb 17, 2025

Conversation

erseco
Copy link
Contributor

@erseco erseco commented Feb 6, 2025

This PR updates the documentation to include proxy_buffering off; in the Nginx configuration example for Mercure. This change improves compatibility when using Mercure behind an SSL-enabled Nginx proxy.

Problem

When Mercure is behind a Nginx reverse proxy with SSL, Nginx buffers responses by default. This can cause issues with long-lived SSE connections, leading to delayed message delivery and unexpected behavior for subscribers.

Solution

Disabling Nginx buffering with the following directive ensures that SSE messages are forwarded immediately to clients:

proxy_buffering off;

Changes

  • Docs: Updated the Nginx configuration example to include proxy_buffering off;
  • Notes: Added a brief explanation of why this directive is necessary when using SSL proxies.

Testing

  • Tested with Mercure behind an Nginx SSL proxy.
  • Observed that after adding proxy_buffering off;, SSE messages are delivered in real-time without delays.

Related issues

#854 #843 #857 #986

@dunglas dunglas merged commit 53f2d85 into dunglas:main Feb 17, 2025
13 checks passed
@dunglas
Copy link
Owner

dunglas commented Feb 17, 2025

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants