- location /ngi-aerial {
- set $args "";
- rewrite ^/ngi-aerial/(\d+)/(\d+)/(\d+)\.jpg /mosaicjson/tiles/WebMercatorQuad/$1/$2/$3@1x?url=https%3A%2F%2Ftiler.openstreetmap.org%2Fza-25cm%2Fmosaic-tiler-https.json&pixel_selection=first&tile_format=jpeg break;
- proxy_pass http://tiler_backend;
- 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 https;
- proxy_set_header X-Forwarded-SSL on;
- proxy_http_version 1.1;
- proxy_redirect off;
- proxy_cache_key "$scheme$proxy_host$uri";
- proxy_cache ngi-aerial;
- proxy_cache_valid any 90d;
- expires max;