location ~* \.(txt|php)$ {
add_header Access-Control-Allow-Origin *;
add_header "Access-Control-Allow-Methods" "GET, POST, OPTIONS, HEAD";
add_header "Access-Control-Allow-Headers" "Authorization, Origin, X-Requested-With, Content-Type, Accept";
}
【笔记】nginx跨域配置
未经允许不得转载:陈桂林博客 » 【笔记】nginx跨域配置