mirror of
https://github.com/symfony/symfony-docs.git
synced 2026-03-24 00:32:14 +01:00
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:
@@ -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...');
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user