Add support for running CodeOcean under a subpath

* Also refactor (JavaScript) routes
This commit is contained in:
Sebastian Serth
2021-07-06 17:02:12 +02:00
parent 7914608efe
commit 237c225732
14 changed files with 40 additions and 28 deletions

View File

@ -40,7 +40,9 @@ module CodeOcean
config.autoload_paths += extra_paths
config.eager_load_paths += extra_paths
config.action_cable.mount_path = '/cable'
config.relative_url_root = ENV.fetch('RAILS_RELATIVE_URL_ROOT', '/').to_s
config.action_cable.mount_path = "#{ENV.fetch('RAILS_RELATIVE_URL_ROOT', '')}/cable"
config.telegraf.tags = {application: 'codeocean'}