0
votes

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
2
Could you share your some of your nginx.conf ? Did you set values like here: github.com/fontello/fontello/wiki/… ? Only chrome or FF is also affected? You are using On-Prem or local?PjoterS
Please mark your answer as accepted. It will be more visible for other people with similar issue.PjoterS
i need to wait tomorrow.. i cant nowcuscode

2 Answers

1
votes

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.

0
votes

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.