(Причина: отсутствует заголовок CORS «Access-Control-Allow-Origin»). Код состояния: 405.
И вот как от этой хрени избавиться? :succubus_huh:add_header Access-Control-Allow-Origin *;
не всегда помогает.
И вот как от этой хрени избавиться? :succubus_huh: 4 comments
|
@sl
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;
}
@sl
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') {