- # Only allow cache purges if from OpenStreetMap referer
- if ($osm_referer) {
- # Allow cache purging headers only from select User-Agents (uses nginx Map)
- proxy_set_header Cache-Control $limit_http_cache_control;
- proxy_set_header Pragma $limit_http_pragma;
- }
- # nginx has no if else logic
- if ($osm_referer != 'osm') {
- proxy_set_header Cache-Control '';
- proxy_set_header Pragma '';
- }
-