I think you need to write a plugin for that and add your hosts, added to LOGIN_REDIRECT_WHITELIST, CORS_ORIGIN_WHITELIST and CSRF_TRUSTED_ORIGINS. something like:
I tried creating the file in the proper location : /home/tutor/.local/share/tutor-plugins, with the name cors.yml
Got this error while trying to add the plugin
> config save -s YOUR_HOST=staging-lms.myllama.co
Configuration saved to /home/tutor/.local/share/tutor/config.yml
Environment generated in /home/tutor/.local/share/tutor/env
> plugins enable cors
Error: plugin 'cors' is not installed.
> plugins install cors
Error: Plugin 'cors' could not be found in indexes
> plugins index add cors
Configuration saved to /home/tutor/.local/share/tutor/config.yml
Fetching index https://overhang.io/tutor/main/palm/plugins.yml...
Fetching index mycorsplugin/palm/plugins.yml...
Failed to update index. File could not be found: [Errno 2] No such file or directory: 'mycorsplugin/palm/plugins.yml'
Fetching index cors/palm/plugins.yml...
Failed to update index. File could not be found: [Errno 2] No such file or directory: 'cors/palm/plugins.yml'
Plugin index local cache: /home/tutor/.local/share/tutor/env/plugins/index/cache.yml
>
Created the file using ssh to my instance, can’t use tutor there, so I used webui to add the plugin.
I was able to solve this issue with the code you provided, was having some trouble in enabling the plugin.
Was able to achive that from the steps mentioned in this doc Creating a Tutor plugin — Tutor documentation