{{- if .Values.onlyoffice.enabled -}} apiVersion: v1 kind: ConfigMap metadata: name: netdisc-config data: seahub_settings.py: | ENABLE_ONLYOFFICE = True VERIFY_ONLYOFFICE_CERTIFICATE = False ONLYOFFICE_APIJS_URL = '/onlyofficeds/web-apps/apps/api/documents/api.js' ONLYOFFICE_FILE_EXTENSION = ('doc', 'docx', 'ppt', 'pptx', 'xls', 'xlsx','odt', 'fodt', 'odp', 'fodp', 'ods', 'fods') ONLYOFFICE_EDIT_FILE_EXTENSION = ('docx', 'pptx', 'xlsx') ONLYOFFICE_JWT_SECRET = '{{.Values.onlyoffice.token}}' CSRF_TRUSTED_ORIGINS = ["https://{{ .Values.ingress.host }}"] --- apiVersion: v1 kind: ConfigMap metadata: name: nginx-config data: nginx.config: | # 将以下内容放入 /shared/nginx/conf/seafile.nginx.conf 顶部 upstream docservice { server onlyoffice; } map $http_x_forwarded_proto $the_scheme { default $http_x_forwarded_proto; "" $scheme; } map $http_x_forwarded_host $the_host { default $http_x_forwarded_host; "" $host; } map $http_upgrade $proxy_connection { default upgrade; "" close; } # 将以下内容放入/shared/nginx/conf/seafile.nginx.conf中的 server{} 块中 location /onlyofficeds/ { proxy_pass http://onlyoffice/; proxy_http_version 1.1; client_max_body_size 100M; proxy_read_timeout 3600s; proxy_connect_timeout 3600s; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection $proxy_connection; proxy_set_header X-Forwarded-Host $the_host/onlyofficeds; proxy_set_header X-Forwarded-Proto https; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } {{- end }}