Closed Fichtme closed 2 years ago
Hey @Fichtme , thanks for the FR.
Do I understand correctly, that your application returns the .apk
file, with the application/zip
content-type header and you want to change this header in the RR plugin to the proper header for the .apk
file according to the mime
types ?
Yeah, that's exactly what i want. But if that's not possible maybe a workaround to define the header for each file type?
But, why you can't send the proper header from the application?
I guess the problem is in the gzip
middleware which is set in the list of the middleware. You may also overwrite the response header with this option: https://github.com/roadrunner-server/roadrunner/blob/master/.rr.yaml#L674
Is your feature request related to a problem? Please describe.
When serving static content the application returns the file with the header
Content-Type | application/zip
.My problem is that i've an
.apk
file. If you download the static content with the header content-typeapplication/zip
. the android browser adds.zip
extension to the file.If i could change that header to
application/vnd.android.package-archive
. The android browser should know that it's receiving an apk file.Describe the solution you'd like An option to change the content-type header for static files. Maybe the static middleware could use a different content-type header depending on file type? (https://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types)
Describe alternatives you've considered Removing gzip from my config, only allowing static content.
Additional context I just started using Roadrunner. It could be that there's already an option within roadrunner.
Using Roadrunner with symfony 4.4 rr version 2.3.1 (build time: 2021-06-30T10:16:05+0000, go1.16.5)