Closed ghost closed 6 years ago
This is not a caddy-docker specific issue, rather a general caddy usage question. Kindly limit the issues open here to bugs or questions specific to this docker image.
It is better to ask questions like this on https://caddy.community.
You can leverage mime directive for this.
mime {
.ttc application/x-font-ttf
.ttf application/x-font-ttf
.otf application/x-font-otf
.woff application/font-woff
.woff2 application/font-woff2
.eot application/vnd.ms-fontobject
}
# leverage redir and header if you have fonts in other domain
header /fonts Access-Control-Allow-Origin *
redir /fonts https://myfontdomain{uri}
@abiosoft OK.Thanks anyway.
caddy-docker is awesome,but I don't know how to setup to serve fonts. Here is apache and nginx CORS headers: https://github.com/fontello/fontello/wiki/How-to-setup-server-to-serve-fonts