richdocuments icon indicating copy to clipboard operation
richdocuments copied to clipboard

public_wopi_url is automatically detected incorrectly and cannot be set manually.

Open BornToBeRoot opened this issue 3 years ago • 8 comments

Describe the bug Url is automatically detected incorrectly and cannot be set manually.

To Reproduce

# Check boths URLs
php occ config:app:get richdocuments wopi_url
php occ config:app:get richdocuments public_wopi_url

# Set Url
php occ config:app:set richdocuments public_wopi_url --value=https:\/\/cloud-test.borntoberoot.net\/custom_apps\/richdocumentscode\/proxy.php?req=

# Check URL again (it's correct)
php occ config:app:get richdocuments public_wopi_url

# Activate config
php occ richdocuments:activate-config

# Check again (it's not correct, again)
php occ config:app:get richdocuments public_wopi_url

image

Expected behavior URL is set correct after this.

Screenshots URL is wrong image

Server details

Latest docker-image: nextcloud:23-apache Latest collabora app via AppStore: richdocuments, richdocumentscode (x86/x64)

BornToBeRoot avatar Jan 16 '22 19:01 BornToBeRoot

If i don't activate the conifg, the url is still wrong but i get another error in chrome:

image

BornToBeRoot avatar Jan 16 '22 19:01 BornToBeRoot

@juliushaertl Any idea how to change the url or detect the proxy correct?

BornToBeRoot avatar Jan 31 '22 21:01 BornToBeRoot

I setup the collabora code server via docker and had to set the variable server_name to my external domain of collabora:

  # Collabora office
  office:
    image: collabora/code:latest
    container_name: nextcloud_${ID}_office
    restart: unless-stopped
    networks:
      - traefik_proxy
    environment:
      - domain=cloud.example.com
      - username=admin
      - password=123456
      - server_name=office.example.com
      - "extra_params=--o:ssl.enable=false --o:ssl.termination=true"
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.nextcloud_${ID}_office.rule=Host(`office.internal.example.com`)"
      - "traefik.http.routers.nextcloud_${ID}_office.entrypoints=websecure"
      - "traefik.http.routers.nextcloud_${ID}_office.tls.certresolver=dns"
      - "traefik.http.routers.nextcloud_${ID}_office.tls=true"
      - "traefik.http.services.nextcloud_${ID}_office.loadbalancer.server.port=9980"
      - "traefik.docker.network=traefik_proxy"

Before setting server_name the public_wopi_url was automaticaly set to office.internal.example.com. Since this domain is not reachable from the internet, the documents failed to load.

Would be great if we can set/override the server_name for the build in code server.

BornToBeRoot avatar Feb 05 '22 23:02 BornToBeRoot

My problem is solved for my instances. Feel free to close this issue if it is no longer relevant for you (e.g. setting the server name for the build in server).

BornToBeRoot avatar Feb 05 '22 23:02 BornToBeRoot

I think setting it manually might still be useful in some setups, so let's keep this as an enhancement request.

juliusknorr avatar Feb 14 '22 10:02 juliusknorr