add_header 'Access-Control-Allow-Origin' '*' always;
add_header 'Access-Control-Allow-Credentials' 'true' always;
add_header 'Access-Control-Allow-Methods' 'GET, PUT, POST, DELETE, OPTIONS, PATCH, PUT' always;
add_header 'Access-Control-Allow-Headers' 'Authorization, Origin, X-Requested-With, Content-Type, Accept, Pagination-Total, Pagination-Page, Pagination-Size' always;
add_header 'Access-Control-Expose-Headers' 'Pagination-Total, Pagination-Page, Pagination-Size' always;
if ($request_method = 'OPTIONS') {
return 200;
}
@hardworm
Я тут круче нашёл