location / {
if ($request_method = 'OPTIONS') {
add_header 'Access-Control-Allow-Origin' '*' always;
add_header 'Access-Control-Allow-Credentials' 'true' always;
add_header 'Access-Control-Allow-Methods' 'GET,POST,PUT,PATCH,DELETE,HEAD,OPTIONS' always;
add_header 'Access-Control-Allow-Headers' 'Origin,Content-Type,Accept,Authorization,X-Features' always;
add_header 'Access-Control-Expose-Headers' 'X-Total-Count,X-Paging-PageSize,X-Paging-PageNumber';
add_header 'Content-Type' 'text/plain charset=UTF-8';
return 204;
}
try_files $uri /index.php?$args;
}