Allow autocompletion behind proxy

When the application is exposed via proxy, i.e. client visible host
(e.g. example.org:443) is different than Ruby server (e.g.
localhost:3000), autocompletion does not work since the generated URLs
refer to the internal hostname.

The AJAX is constructed with root_url and that can be modified with
default_url_options. So the simple fix just allows specifying customized
default_url_options.

Fixes: #1416
This commit is contained in:
Michal Koutný 2022-04-29 02:43:08 +02:00
parent a5fea13526
commit d52893bc58
2 changed files with 9 additions and 0 deletions

View file

@ -35,5 +35,7 @@ module Tracksapp
# configure Tracks to handle deployment in a subdir
config.relative_url_root = SITE_CONFIG['subdir'] if SITE_CONFIG['subdir']
# or deployment behind a proxy
config.action_controller.default_url_options = SITE_CONFIG['default_url_options'] if SITE_CONFIG['default_url_options']
end
end