Enable streamed responses under nginx

Created on 3 November 2023, about 1 year ago

Problem/Motivation

Adding Apache config like the following will enable streamed responses for CKEditor:

<Proxy "fcgi://php:9000/">
  ProxySet enablereuse=on flushpackets=on max=10
</Proxy>

However this does not work for nginx.

Proposed resolution

Changing the StreamedResponse to contain the following headers got streamed responses to work under nginx, using stock DDEV nginx configuration:

}, 200, [
      'Cache-Control'     => 'no-cache, must-revalidate',
      'Content-Type'      => 'text/event-stream',
      'X-Accel-Buffering' => 'no',
    ]);

Remaining tasks

Test that this change also does not break Apache setups.

✨ Feature request
Status

Fixed

Version

1.0

Component

OpenAI CKEditor

Created by

πŸ‡ΊπŸ‡ΈUnited States kevinquillen

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024