From: Paul Norman Date: Sun, 13 Oct 2024 05:52:09 +0000 (-0700) Subject: vectortile: Set the base URL of the site X-Git-Url: https://git.openstreetmap.org./chef.git/commitdiff_plain/c2ff078bfc6519fad2c741f04ef84fcf4f6530f3?ds=inline;hp=9b5a2c1032d93d7aac7eac09c542e084a6792961 vectortile: Set the base URL of the site --- diff --git a/cookbooks/vectortile/recipes/default.rb b/cookbooks/vectortile/recipes/default.rb index 6fcf25317..39c54e5dd 100644 --- a/cookbooks/vectortile/recipes/default.rb +++ b/cookbooks/vectortile/recipes/default.rb @@ -222,7 +222,7 @@ systemd_service "tilekiln" do wants "postgresql.service" sandbox :enable_network => true restrict_address_families "AF_UNIX" - exec_start "#{tilekiln_directory}/bin/tilekiln serve #{tilekiln_mode} --storage-dbname tiles --num-threads #{node[:vectortile][:serve][:threads]}" + exec_start "#{tilekiln_directory}/bin/tilekiln serve #{tilekiln_mode} --storage-dbname tiles --num-threads #{node[:vectortile][:serve][:threads]} --base-url 'https://vector.openstreetmap.org'" end service "tilekiln" do diff --git a/test/integration/vectortile/inspec/tilekiln_spec.rb b/test/integration/vectortile/inspec/tilekiln_spec.rb index 2887571db..d44562d4c 100644 --- a/test/integration/vectortile/inspec/tilekiln_spec.rb +++ b/test/integration/vectortile/inspec/tilekiln_spec.rb @@ -21,6 +21,10 @@ describe http("https://localhost/shortbread_v1/tilejson.json", :ssl_verify => fa its("status") { should cmp 200 } end +describe json(:content => http("https://localhost/shortbread_v1/tilejson.json", :ssl_verify => false)) do + its(["tiles"]) { should eq(["https://vector.openstreetmap.org/shortbread_v1/{z}/{x}/{y}.mvt"]) } +end + # There are no tiles so everything should return a 404 describe http("https://localhost/shortbread_v1/0/0/0.mvt", :ssl_verify => false) do its("status") { should cmp 404 }