Last active
March 29, 2018 08:04
-
-
Save toamitkumar/814dbfc9969597a4553dc9d3a6c876c7 to your computer and use it in GitHub Desktop.
nginx config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment