10 2022 档案

摘要:Nginx rewrite 的last、break、redirect、permanent有四种模式: last和break 都会跳转的rewrite的地址,区别是: last跳转后,会重新发起请求再匹配一次location,而break则只进行跳转,不再重新请求。 当rewrite后的地址是一个直接 阅读全文
posted @ 2022-10-15 14:52 全玉 阅读(3674) 评论(0) 推荐(0) 编辑
摘要:1. 默认server增加location # 第一个站点配置 location / { root /data/apps/a; index index.html index.htm; } # 部署的后端访问地址和端口号 location /a-api/ { proxy_pass http://127 阅读全文
posted @ 2022-10-15 14:20 全玉 阅读(2772) 评论(0) 推荐(1) 编辑
摘要:1. proxy_pass代理 1.1 location和proxy_pass后面的/必须保留 1.2 proxy_pass后面的http://必须带上,不带会报404 server { location /a/ { proxy_pass http://www.baidu.com/; } locat 阅读全文
posted @ 2022-10-15 14:17 全玉 阅读(162) 评论(0) 推荐(0) 编辑
摘要:1. 查找nginx which nginx 输出 /usr/local/bin/nginx 2. 查找nginx配置文件 /usr/local/bin/nginx -t #检测配置是否正确,同时可以输出配置文件路径 输出: nginx: the configuration file /usr/lo 阅读全文
posted @ 2022-10-15 13:40 全玉 阅读(838) 评论(0) 推荐(0) 编辑
摘要:AbortController 从 v0.22.0 开始,Axios 支持以 fetch API 方式—— AbortController 取消请求: const controller = new AbortController(); axios.get('/foo/bar', { signal: 阅读全文
posted @ 2022-10-14 10:53 全玉 阅读(280) 评论(0) 推荐(0) 编辑
摘要://iframe下载文件 function downloadFileByIfr(downLoadUrl) { // 移除旧的节点 const oldNode = document.querySelector("#g-exportOrder-iframe") if (oldNode) { docume 阅读全文
posted @ 2022-10-14 10:38 全玉 阅读(1602) 评论(0) 推荐(0) 编辑
摘要:提交form方式打开新页面,可以跨域提交参数,而且打开新页面不会被浏览器拦截 // 打开新窗口 // postNew('http://localhost:8080',{name:'小明',age:12}) function postNew(url, params) { let form = docu 阅读全文
posted @ 2022-10-14 10:37 全玉 阅读(626) 评论(0) 推荐(0) 编辑
摘要:去除上下文 1. location和proxy_pass都带/,可去除上下文 location ^~/api/ { proxy_pass http://api/; } 2. rewrite去除 http://api 的 api后面不带/, 通过rewrite移除api这个上下文 location ^ 阅读全文
posted @ 2022-10-13 15:01 全玉 阅读(10060) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示