policy_selector:
  static:
    policy: ocis

policies:
  - name: ocis
    routes:
      # defaults, taken from https://owncloud.dev/services/proxy/configuration/
      - endpoint: /
        backend: http://localhost:9100
      - endpoint: /.well-known/
        backend: http://localhost:9130
      - endpoint: /konnect/
        backend: http://localhost:9130
      - endpoint: /signin/
        backend: http://localhost:9130
      - endpoint: /archiver
        backend: http://localhost:9140
      - type: regex
        endpoint: /ocs/v[12].php/cloud/user/signing-key
        backend: http://localhost:9110
      - endpoint: /ocs/
        backend: http://localhost:9140
      - type: query
        endpoint: /remote.php/?preview=1
        backend: http://localhost:9115
      - method: REPORT
        endpoint: /remote.php/dav/
        backend: http://localhost:9115
      - type: query
        endpoint: /dav/?preview=1
        backend: http://localhost:9115
      - type: query
        endpoint: /webdav/?preview=1
        backend: http://localhost:9115
      - endpoint: /remote.php/
        service: com.owncloud.web.ocdav
      - endpoint: /dav/
        service: com.owncloud.web.ocdav
      - endpoint: /webdav/
        service: com.owncloud.web.ocdav
      - endpoint: /status.php
        service: com.owncloud.web.ocdav
      - endpoint: /index.php/
        service: com.owncloud.web.ocdav
      - endpoint: /apps/
        service: com.owncloud.web.ocdav
      - endpoint: /data
        backend: http://localhost:9140
      - endpoint: /app/
        backend: http://localhost:9140
      - endpoint: /graph/
        backend: http://localhost:9120
      - endpoint: /graph-explorer
        backend: http://localhost:9135
      - endpoint: /api/v0/settings
        backend: http://localhost:9190
      - endpoint: /settings.js
        backend: http://localhost:9190
      # oCIS Hello specific routes
      - endpoint: "/api/v0/greet"
        backend: http://ocis-hello:9105
      - endpoint: "/hello.js"
        backend: http://ocis-hello:9105
