Skip to content

server_name env variable doesn't work #19

@krakazyabra

Description

@krakazyabra

Summary

Steps to reproduce

  1. Build image
  2. Use official helm chart https://github.com/CollaboraOnline/online/tree/master/kubernetes/helm/collabora-online
  3. set env:
      environmentVariablesLool+: [
        {
          name: 'extra_params',
          value: '--o:ssl.enable=false --o:ssl.termination=true',
        },
        {
          name: 'ALLOWED_HOSTS',
          value: 'my.domain.com',
        },
        {
          name: 'domain',
          value: 'my.domain.com',
        },
        {
          name: 'server_name',
          value: 'https://collabora.domain.com:443',
        },
        {
          name: 'username',
          value: 'admin',
        },
        {
          name: 'password',
          value: 'password',
        },
      ],

What is the expected correct behavior?

lool@collabora-online-667b8bd6bc-nqrp6:/$ cat /etc/loolwsd/loolwsd.xml | grep server_name
    <server_name desc="External hostname:port of the server running loolwsd. If empty, it's derived from the request (please set it if this doesn't work). Must be specified when behind a reverse-proxy or when the hostname is not reachable directly." type="string" default="">https://collabora.domain.com:443</server_name>

Relevant logs and/or screenshots

Environment

  • Image version / tag: build from master
  • Host OS:
Details When there is no value for server_name in /etc/loolwsd/loolwsd.xml hostname will be used by default. Nextcloud accessing collabora by url (https://collabora.domain.com:443), but collabora container reports, that request should be routed to `collabora-online-667b8bd6bc-nqrp6` (hostname). In local infrastructure it can be solved by editing /etc/hosts, but not in production, when there is ingress-controller in front.
lool@collabora-online-667b8bd6bc-nqrp6:/$ cat /etc/loolwsd/loolwsd.xml | grep server_name
    <server_name desc="External hostname:port of the server running loolwsd. If empty, it's derived from the request (please set it if this doesn't work). Must be specified when behind a reverse-proxy or when the hostname is not reachable directly." type="string" default="">collabora-online-667b8bd6bc-nqrp6</server_name>

Possible fixes

add $server_name variable into config, pass it inside /etc/loolwsd/loolwsd.xml

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions