location ~ /api/v1/cards/(\w+)/(\w+) { if ($request_method = OPTIONS ) { add_header 'Access-Control-Allow-Origin' '*'; add_header 'Access-Control-Allow-Methods' 'GET, OPTIONS'; add_header 'Access-Control-Allow-Headers' 'Cache-Control,Content-Type,If-Modified-Since'; return 204; } add_header 'Access-Control-Allow-Origin' '*'; add_header 'Access-Control-Allow-Methods' 'GET, OPTIONS'; add_header 'Access-Control-Allow-Headers' 'Cache-Control,Content-Type,If-Modified-Since'; add_header 'Access-Control-Allow-Headers' 'Content-Type,If-Modified-Since'; add_header 'Cache-Control' 'no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0'; add_header 'Content-type' 'application/json'; default_type application/json; try_files $uri.json } location ~ /api/v1/cards/(\w+)/(\w+)\,(\w+) { if ($request_method = OPTIONS ) { add_header 'Access-Control-Allow-Origin' '*'; add_header 'Access-Control-Allow-Methods' 'GET, OPTIONS'; add_header 'Access-Control-Allow-Headers' 'Cache-Control,Content-Type,If-Modified-Since'; return 204; } add_header 'Access-Control-Allow-Origin' '*'; add_header 'Access-Control-Allow-Methods' 'GET, OPTIONS'; add_header 'Access-Control-Allow-Headers' 'Cache-Control,Content-Type,If-Modified-Since'; add_header 'Access-Control-Allow-Headers' 'Content-Type,If-Modified-Since'; add_header 'Cache-Control' 'no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0'; add_header 'Content-type' 'application/json'; default_type application/json; try_files /usr/share/nginx/html/telkomsel_d8/sites/default/files/assets/cards/$1/$2_$3.json; }