NGINX修改配置,增加了跨域https请求
保存后导出源码
PHP环境支持断点调试。
nginx配置
listen 443 ssl http2;
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Credentials' 'true';
ssl_certificate D:/phpstudy_pro/Extensions/Nginx1.16.1/conf/php.diygw.com.crt;
ssl_certificate_key D:/phpstudy_pro/Extensions/Nginx1.16.1/conf/php.diygw.com.key;
ssl_protocols TLSv1.1 TLSv1.2 TLSv1.3;
ssl_ciphers EECDH+CHACHA20:EECDH+CHACHA20-draft:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5;
ssl_prefer_server_ciphers on;
ssl_session_cache shared:SSL:10m;
ssl_session_timeout 10m;
add_header Strict-Transport-Security "max-age=31536000";
//修改siteinfo.js basepath修改为空
export default {
basePath: '',
fileBasePath: 'http://lib.diygw.com',
title: 'test',
debug: true,
appid:'5700'
}
manifest.json增加以下配置
"devServer": {
"disableHostCheck": true,
"proxy":{
"/diy":{
"target":"https://php.diygw.com",
"changeOrigin":true,
"secure":true,
"pathRewrite":{"^/diy": "/diy"}
}
}
},