diff --git a/config/application.rb b/config/application.rb index 9d8c9e821..45018052a 100644 --- a/config/application.rb +++ b/config/application.rb @@ -35,5 +35,7 @@ class Application < Rails::Application # 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 diff --git a/config/site.yml.tmpl b/config/site.yml.tmpl index c648632da..283ae60b8 100644 --- a/config/site.yml.tmpl +++ b/config/site.yml.tmpl @@ -39,6 +39,13 @@ force_ssl: false # the relative URL. Mongrel, for example, has a --prefix option. # subdir: "/tracks" +# Set this to respective values if you're instance is running behind a proxy +# (e.g. localhost:3000 is not the client visible host). +# default_url_options: +# :host: 'example.org' +# :protocol: 'https://' +# :port: 443 + # Set to true to allow anyone to sign up for a username. open_signups: false