Merge branch '6.4' into 7.2

* 6.4:
  Update the links related to X-Sendfile and X-Accel-Redirect
  Update the build script to mention that it does not support Windows
This commit is contained in:
Javier Eguiluz
2025-04-15 08:07:33 +02:00
2 changed files with 14 additions and 6 deletions

View File

@@ -15,6 +15,13 @@ use SymfonyDocsBuilder\DocBuilder;
->addOption('generate-fjson-files', null, InputOption::VALUE_NONE, 'Use this option to generate docs both in HTML and JSON formats')
->addOption('disable-cache', null, InputOption::VALUE_NONE, 'Use this option to force a full regeneration of all doc contents')
->setCode(function(InputInterface $input, OutputInterface $output) {
// the doc building app doesn't work on Windows
if ('\\' === DIRECTORY_SEPARATOR) {
$output->writeln('<error>ERROR: The application that builds Symfony Docs does not support Windows. You can try using a Linux distribution via WSL (Windows Subsystem for Linux).</error>');
return 1;
}
$io = new SymfonyStyle($input, $output);
$io->text('Building all Symfony Docs...');

View File

@@ -837,9 +837,10 @@ Alternatively, if you are serving a static file, you can use a
The ``BinaryFileResponse`` will automatically handle ``Range`` and
``If-Range`` headers from the request. It also supports ``X-Sendfile``
(see for `FrankenPHP`_, `nginx`_ and `Apache`_). To make use of it, you need to determine
whether or not the ``X-Sendfile-Type`` header should be trusted and call
:method:`Symfony\\Component\\HttpFoundation\\BinaryFileResponse::trustXSendfileTypeHeader`
(see `FrankenPHP X-Sendfile and X-Accel-Redirect headers`_,
`nginx X-Accel-Redirect header`_ and `Apache mod_xsendfile module`_). To make use
of it, you need to determine whether or not the ``X-Sendfile-Type`` header should
be trusted and call :method:`Symfony\\Component\\HttpFoundation\\BinaryFileResponse::trustXSendfileTypeHeader`
if it should::
BinaryFileResponse::trustXSendfileTypeHeader();
@@ -1061,9 +1062,9 @@ Learn More
/session
/http_cache/*
.. _FrankenPHP: https://frankenphp.dev/docs/x-sendfile/
.. _nginx: https://mattbrictson.com/blog/accelerated-rails-downloads
.. _Apache: https://tn123.org/mod_xsendfile/
.. _`FrankenPHP X-Sendfile and X-Accel-Redirect headers`: https://frankenphp.dev/docs/x-sendfile/
.. _`nginx X-Accel-Redirect header`: https://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_ignore_headers
.. _`Apache mod_xsendfile module`: https://github.com/nmaier/mod_xsendfile
.. _`JSON Hijacking`: https://haacked.com/archive/2009/06/25/json-hijacking.aspx/
.. _`valid JSON top-level value`: https://www.json.org/json-en.html
.. _OWASP guidelines: https://cheatsheetseries.owasp.org/cheatsheets/AJAX_Security_Cheat_Sheet.html#always-return-json-with-an-object-on-the-outside