Unable to theme OCIS

I’m trying to theme OCIS and can’t for the life of me get it to use an external URL. In ocis.yaml I have the following:

web:
  web:
    theme_server: https://notmyrealdomain.com
    theme_path: /ocis/theme.json

https://notmyrealdomain.com/ocis/theme.json loads just fine for me in a web browser and the theme.json file was taken directly from the default OCIS theme.json. I tried also using the WEB_ASSET_PATH and WEB_UI_THEME_PATH env variables with identical results. Not sure how to debug this further or sort out why the remote theme isn’t loading.

hey @walt could you please check
a) in your browser console if any CORS issues are shown? something about the browser refusing to load the theme.json?
b) in your browser dev tools “network” tab if the file is requested at all? If yes, any error?

2 Likes

Browser console shows the following error:

Failed to load theme 'https://ocis.redacted.com/ocis/theme.json' is not a valid json file, using default theme.
(anonymous) @ web-runtime-f0fd7d61.js:1

Seems that OCIS is reading theme_path as we configured, but it’s using OCIS_URL as the root URL instead of theme_server. We need to get OCIS using https://notmyrealdomain.com/ocis/theme.json for the theme, or somehow expose a custom theme.json under our OCIS server at https://ocis.redacted.com.