費話不多說直接上代碼
add_header 'Access-Control-Allow-Origin' '*'; add_header 'Access-Control-Allow-Headers' 'X-Requested-With, Content-Type'; add_header 'Access-Control-Allow-Credentials' 'true'; add_header 'Access-Control-Allow-Methods' 'OPTION, POST, GET';
打開寶塔的網(wǎng)站配置面板,如圖加到所在位置