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;
        
    } 
支付宝捐赠
请使用支付宝扫一扫进行捐赠
微信捐赠
请使用微信扫一扫进行赞赏
有 0 篇文章