By default, httpd contains the following configuration:
<IfModule mime_module>
#
# TypesConfig points to the file containing the list of mappings from
# filename extension to MIME-type.
#
TypesConfig conf/mime.types
...
</IfModule>
This file contains a mapping from filename extensions to MIME types. Normally this is what I want, but I'd like to disable mapping for reverse proxies. How can I instruct mime_module to process /*
but exclude /proxy/*
?
Why?
mime_module contains the following line:
application/x-msdownload exe dll com bat msi
The application being proxied accepts PUT /proxy/rest/email@gmail.com
and returns 200 OK
without setting Content-Type
or a response body. According to https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-p2-semantics-24#section-3.1.1.5 this is perfectly legal (since there is no response body).
mime_module
thinks the URL applies to a .com
file and mistakenly applies Content-Type: application/x-msdownload
. Since I know that /proxy/rest/
never returns files, I'd like to disable mime_module
for that path.