Skip to content

[HttpFoundation][FrameworkBundle] Add BinaryFileResponse::setXSendfileHeader() and corresponding config option to help configure upload acceleration #58162

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

Conversation

nicolas-grekas
Copy link
Member

Q A
Branch? 7.2
Bug fix? no
New feature? yes
Deprecations? no
Issues -
License MIT

Follows #58161 (comment) (and embeds the corresponding commit for now)

@carsonbot carsonbot added this to the 7.2 milestone Sep 3, 2024
@nicolas-grekas nicolas-grekas changed the title Fwb x sendfile header [HttpFoundation][FrameworkBundle] Add BinaryFileResponse::setXSendfileHeader() and corresponding config option to help configure upload acceleration Sep 3, 2024
…S`, `SYMFONY_TRUSTED_HEADERS`, `SYMFONY_TRUST_X_SENDFILE_TYPE_HEADER` and `SYMFONY_TRUSTED_HOSTS` env vars
…eHeader() and corresponding config option to help configure upload acceleration
@OskarStark OskarStark changed the title [HttpFoundation][FrameworkBundle] Add BinaryFileResponse::setXSendfileHeader() and corresponding config option to help configure upload acceleration [HttpFoundation][FrameworkBundle] Add BinaryFileResponse::setXSendfileHeader() and corresponding config option to help configure upload acceleration Sep 5, 2024
@nicolas-grekas
Copy link
Member Author

Let me withdraw this PR: X-Senfile-Type is coming from the RoR world, and requires the server to send an X-Accel-Mapping header anyway so there is always something to configure on the server-side (at least for nginx)

See https://github.com/rack/rack/blob/main/lib/rack/sendfile.rb and https://mattbrictson.com/blog/accelerated-rails-downloads for more on the topic.

@nicolas-grekas
Copy link
Member Author

See also #58181

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants