My Nginx Kubernetes ingress I think is not properly configured to serve .ttf file.
On safari work properly, but on chrome I have an error about cors allow. I checked my .conf Nginx file on my deployed ingress and "more_set_headers Access-Control-Allow-Origin: *
is configured.
I think I need to add some annotations on mime.types or gzip config.
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
name: cc-i
annotations:
nginx.ingress.kubernetes.io/enable-cors: "true"
spec:
rules:
- host: myapp.com
http:
paths:
- backend:
serviceName: cc-s
servicePort: 80
- http:
paths:
- backend:
serviceName: cc-s
servicePort: 80
Verify wich type of installation you have made and verify you have the nginx-config
configmap. See docs
If you don't have, create one and set this in the data
area:
data:
gzip_types: application/x-font-ttf application/font-woff
And if you need more gzip_type
you could add too. Here are the default values.
If the problem is the gzip config like you say this will solve your problem.
Some CDN services has a cors configuration that need to be configured. In my case i added a cors authorized domain on my digitalocean space. This solved on firefox and chrome.