homestead的跨域配置

homestead.yaml

#在site下增加headers headers: - key: "Access-Control-Allow-Origin" value: "*" - key: "Access-Control-Allow-Headers" value: "*" - key: "Access-Control-Allow-Methods" value: "*" - key: "Access-Control-Allow-Content-Type" value: "*" - key: "Access-Control-Allow-Credentials" value: "true"

将要修改type类型的sh文件中 headers 放到外边来 不然有的情况肯能不会生效

$headersTXT location / { try_files \$uri \$uri/ /index.php?\$query_string; }