]> git.openstreetmap.org Git - chef.git/commitdiff
imagery: fixes for host and https
authorGrant Slater <github@firefishy.com>
Tue, 9 Jan 2024 17:36:58 +0000 (17:36 +0000)
committerGrant Slater <github@firefishy.com>
Tue, 9 Jan 2024 17:36:58 +0000 (17:36 +0000)
cookbooks/imagery/recipes/default.rb
cookbooks/imagery/templates/default/nginx_titiler.conf.erb

index 6b4cbe9db3e07460f991fa1a30e2cf6d98b6a6c2..a473b445299d764a80fe35e5184702e7bd9c97ed 100644 (file)
@@ -70,10 +70,10 @@ execute "uk_os_OSTN15_NTv2_OSGBtoETRS.tif" do
   not_if { ::File.exist?("/usr/share/proj/uk_os_OSTN15_NTv2_OSGBtoETRS.tif") }
 end
 
-nginx_site "default" do
-  template "nginx_default.conf.erb"
-  directory "/srv/imagery/default"
-end
+nginx_site "default" do
+  template "nginx_default.conf.erb"
+  directory "/srv/imagery/default"
+end
 
 systemd_tmpfile "/run/mapserver-fastcgi" do
   type "d"
index 2ce67a36b0582e227751231f4979675db482975a..85961b8cf252cb1c6c1638fff857c22ec82dbb36 100644 (file)
@@ -33,12 +33,12 @@ server {
     gzip_comp_level 9;
     gzip_vary on;
 
-    location /api/v1/titiler {
+    location / {
       rewrite ^/api/v1/titiler(.*)$ $1 break;
       proxy_pass http://localhost:8080;
       proxy_set_header HOST $host;
       proxy_set_header Referer $http_referer;
       proxy_set_header X-Forwarded-For $remote_addr;
-      proxy_set_header X-Forwarded-Proto $scheme;
+      proxy_set_header X-Forwarded-Proto https;
     }
 }