nextcloud / helm

A community maintained helm chart for deploying Nextcloud on Kubernetes.
GNU Affero General Public License v3.0
295 stars 258 forks source link

Missing MIME type #519

Closed Lerentis closed 5 months ago

Lerentis commented 5 months ago

Describe your Issue

Using the default nginx config should include all nessesary mime types.

Logs and Errors

Currently when i rollout the latest version of nextcloud fpm with nginx sidecar enabled it results in the warning:

Your webserver does not serve .mjs files using the JavaScript MIME type. This will break some apps by preventing browsers from executing the JavaScript files. You should configure your webserver to serve .mjs files with either the text/javascript or application/javascript MIME type.

Describe your Environment

nextcloud:
  image:
    repository: nextcloud
    tag: 28.0.2-fpm
    flavor: fpm
    pullPolicy: IfNotPresent
  replicaCount: 1

  ingress:
    enabled: true
    className: nginx
    annotations:
      external.dns/provider: cf
      nginx.ingress.kubernetes.io/proxy-body-size: 4G
      nginx.ingress.kubernetes.io/server-snippet: |-
        server_tokens off;
        proxy_hide_header X-Powered-By;
        rewrite ^/.well-known/webfinger /index.php/.well-known/webfinger last;
        rewrite ^/.well-known/nodeinfo /index.php/.well-known/nodeinfo last;
        rewrite ^/.well-known/host-meta /public.php?service=host-meta last;
        rewrite ^/.well-known/host-meta.json /public.php?service=host-meta-json;
        location = /.well-known/carddav {
          return 301 $scheme://$host/remote.php/dav;
        }
        location = /.well-known/caldav {
          return 301 $scheme://$host/remote.php/dav;
        }
        location = /robots.txt {
          allow all;
          log_not_found off;
          access_log off;
        }
        location ~ ^/(?:build|tests|config|lib|3rdparty|templates|data)/ {
          deny all;
        }
        location ~ ^/(?:autotest|occ|issue|indie|db_|console) {
          deny all;
        }
    tls:
      - hosts:
          - REDACTED
    labels: {}
    path: /
    pathType: Prefix

  phpClientHttpsFix:
    enabled: false
    protocol: https

  nextcloud:
    host: REDACTED
    username: REDACTED
    password: REDACTED
    existingSecret:
      enabled: true
      secretName: nextcloud
      usernameKey: nextcloud-username
      passwordKey: nextcloud-password
      tokenKey: nextcloud-token
      # smtpUsernameKey: smtp-username
      # smtpPasswordKey: smtp-password
    extraEnv:
      - name: OVERWRITEPROTOCOL
        value: https
      - name: TRUSTED_PROXIES
        value: '0.0.0.0/0'
      - name: PHP_MEMORY_LIMIT
        value: 512M
  nginx:
    enabled: true
  externalDatabase:
    enabled: true
    type: postgresql
    host: nextcloud-postgresql
    database: nextcloud
    existingSecret:
      enabled: true
      secretName: nextcloud.nextcloud-postgresql.credentials.postgresql.acid.zalan.do
      usernameKey: username
      passwordKey: password
    architecture: standalone
  redis:
    enabled: true
    image:
      tag: 6.2.10-debian-11-r14
    auth:
      enabled: true
      password: 'SEE_BITWARDEN'
    replica:
      persistence:
        enabled: false
    master:
      persistence:
        enabled: false
  cronjob:
    enabled: true
    image: 
      repository: curlimages/curl
      tag: 8.5.0
      pullPolicy: IfNotPresent
    schedule: "*/5 * * * *"
    curlInsecure: false
    failedJobsHistoryLimit: 2
    successfulJobsHistoryLimit: 2

  persistence:
    enabled: true
    storageClass: "longhorn"
    accessMode: ReadWriteOnce
    size: 20Gi

Additional context, if any

Missing in nginx config

  include mime.types;
  types {
      application/javascript js mjs;
  }