не работает SSE - Server Sent Events
Добавлено: Вт мар 04, 2025 11:28 am
Принципиально BrainyCP не даёт работать SSE.
Что делать , помогите ГУРУ пожалуйста.
в PHP прописывал:
в NGINX прописывал
Что делать , помогите ГУРУ пожалуйста.
Что делать , помогите ГУРУ пожалуйста.
в PHP прописывал:
Код: Выделить всё
header('Content-Type: text/event-stream');
header('Connection: keep-alive');
header('Cache-Control: no-store');
header("Cache-Control: no-cache");
header('Access-Control-Allow-Origin: *');
header('Transfer-Encoding: ""');
header("X-Accel-Buffering: no");
date_default_timezone_set("Europe/Moscow");
Код: Выделить всё
location /modules/mod_multi_form/media/sse.php {
# SSE essential settings
proxy_http_version 1.1;
proxy_set_header Connection '';
proxy_buffering off;
proxy_cache off;
chunked_transfer_encoding off;
fastcgi_buffering off; # http, server, location
uwsgi_buffering off; # http, server, location
proxy_set_header Content-Type text/event-stream;
proxy_set_header Cache-Control no-cache;
proxy_set_header X-Accel-Buffering no;
proxy_set_header 'Access-Control-Allow-Origin' '*';
proxy_set_header 'Access-Control-Allow-Methods' 'GET, OPTIONS';
#keepalive_min_timeout 1;
keepalive_time 3;
# Timeouts
proxy_connect_timeout 60s;
proxy_read_timeout 3600s;
proxy_send_timeout 3600s;
# Headers
add_header Content-Type text/event-stream;
add_header Cache-Control no-cache;
add_header X-Accel-Buffering no;
# CORS configuration
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Methods' 'GET, OPTIONS';
rewrite ^(.*)$ $scheme://new-domain.com/$1 redirect;
# proxy_pass http://178.57.218.194:8080;
try_files /modules/mod_multi_form/media/sse.php /404.php =404;
#return;
#proxy_pass http://127.0.0.1:8080;
}