Open andriokha opened 1 week ago
Have you already tried it by adding your own .ddev/nginx_full/nginx_site.conf?
Do you think this is a correct thing to do for everybody? If so, after you have tested it, please add a PR.
Thanks @rfay
Have you already tried it by adding your own .ddev/nginx_full/nginx_site.conf?
Yup
Do you think this is a correct thing to do for everybody?
I can't think of any negatives. I guess it's normally not forwarded because it's considered an internal directive and it's generally better not to be promiscuous. But I'm not a sysad (:
I've made #6564 where I was bold and decided to forward all the X-Accel-*
headers, as it feels like the others could be useful for the same reason, but happy to cut it back if desired.
Updated issue description to be about passing all X-Accel-*
headers.
Is there an existing issue for this?
Is your feature request related to a problem?
I tried to run the Drupal functional test
\Drupal\Tests\big_pipe\Functional\BigPipeTest
and got some errorsDetails
``` PHPUnit 9.6.20 by Sebastian Bergmann and contributors. Testing Drupal\Tests\big_pipe\Functional\BigPipeTest .EE. 4 / 4 (100%) Time: 00:14.646, Memory: 6.00 MB There were 2 errors: 1) Drupal\Tests\big_pipe\Functional\BigPipeTest::testBigPipe Behat\Mink\Exception\ExpectationException: Current response header "X-Accel-Buffering" is "", but "no" expected. /var/www/html/vendor/behat/mink/src/WebAssert.php:888 /var/www/html/vendor/behat/mink/src/WebAssert.php:180 /var/www/html/web/core/modules/big_pipe/tests/src/Functional/BigPipeTest.php:338 /var/www/html/web/core/modules/big_pipe/tests/src/Functional/BigPipeTest.php:161 /var/www/html/vendor/phpunit/phpunit/src/Framework/TestResult.php:729 2) Drupal\Tests\big_pipe\Functional\BigPipeTest::testBigPipeNoJs Behat\Mink\Exception\ExpectationException: Current response header "X-Accel-Buffering" is "", but "no" expected. /var/www/html/vendor/behat/mink/src/WebAssert.php:888 /var/www/html/vendor/behat/mink/src/WebAssert.php:180 /var/www/html/web/core/modules/big_pipe/tests/src/Functional/BigPipeTest.php:338 /var/www/html/web/core/modules/big_pipe/tests/src/Functional/BigPipeTest.php:251 /var/www/html/vendor/phpunit/phpunit/src/Framework/TestResult.php:729 ERRORS! Tests: 4, Assertions: 86, Errors: 2. ```It looks like the bigpipe test is trying to verify the
X-Accel-Buffering
header is correctly set, while nginx by default filters it out.Describe your solution
You can use the following config to make nginx forward the header:
There are other
X-Accel-*
headers too that might be useful during development that can be forwarded:X-Accel-Charset
X-Accel-Expires
X-Accel-Limit-Rate
X-Accel-Redirect
Describe alternatives
No response
Additional context
I've fixed it locally by customizing the nginx config, but I thought it might be useful to make it the default, either for Drupal or more generally, if DDEV is aimed primarily at development. Thanks!