X-Git-Url: https://git.openstreetmap.org/chef.git/blobdiff_plain/d030db57d5c5852f16ce52b0e61bd554aba070d5..720abae3e8f61545f741e649c38b810493790830:/cookbooks/nominatim/templates/default/nominatim.erb diff --git a/cookbooks/nominatim/templates/default/nominatim.erb b/cookbooks/nominatim/templates/default/nominatim.erb index 8866f17fb..d36523d85 100644 --- a/cookbooks/nominatim/templates/default/nominatim.erb +++ b/cookbooks/nominatim/templates/default/nominatim.erb @@ -2,5 +2,8 @@ # DO NOT EDIT - This file is being maintained by Chef @define('CONST_Database_DSN', 'pgsql://@/<%= node[:nominatim][:database][:dbname] %>'); -@define('CONST_Website_BaseURL', 'https://nominatim.openstreetmap.org/'); +if (isset($_SERVER['HTTPS']) && !empty($_SERVER['HTTPS'])) + @define('CONST_Website_BaseURL', 'https://nominatim.openstreetmap.org/'); +else + @define('CONST_Website_BaseURL', 'http://nominatim.openstreetmap.org/');