1
0
mirror of https://github.com/pocketbase/pocketbase.git synced 2025-01-10 00:43:36 +02:00
pocketbase/tools/filesystem
Rohan Verma 3cbab96f51
[#661] serve css files with text/css content-type
Currently, css files are served as text/plain by the server. It is not
trivial to detect css file types similar to the issue with svg files.

When the css files are served as text/plain instead of
text/css they become unusable as stylesheets in the browser when served
via the api.

In this commit we generalize the svg detection to also detect css files
and serve specific extensions with their respective mimetypes.
2022-09-28 21:25:50 +03:00
..
filesystem_test.go [#661] serve css files with text/css content-type 2022-09-28 21:25:50 +03:00
filesystem.go [#661] serve css files with text/css content-type 2022-09-28 21:25:50 +03:00