mirror of
https://github.com/TracksApp/tracks.git
synced 2025-09-21 21:40:48 +02:00
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:
parent
a5fea13526
commit
d52893bc58
2 changed files with 9 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue