Skip to content

Serve static files directly if not caught by web server

M. Dent requested to merge dentm42/core:serve-static-files into dev

if the query variable q= is fed the location of a file with the following extensions and that file exists, serve it directly from the file system:

jpg,jpeg,gif,png,ico,css,js,htm,html,map,ttf,woff,woff2,svg

In most cases, the web server should be configured to intercept these files and a request should never actually get to us. In some specialized circumstances, there may be a need to have the application handle these files.

Note: Because they are static files, they are set to allow caching under the same terms as the published web server configuration recommendations.

Merge request reports

Loading