work hard work smart

专注于Java后端开发。 不断总结,举一反三。
  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2020年6月13日

摘要: 1、跨域请求配置。 配置的位置如下图所示 2、跨域配置 # 允许跨域请求的域,*代表所有 add_header 'Access-Control-Allow-Origin' *; # 允许带上cookie请求 add_header 'Access-Control-Allow-Credentials' 阅读全文

posted @ 2020-06-13 15:49 work hard work smart 阅读(233) 评论(0) 推荐(0) 编辑

摘要: 1、压缩配置 gzip on; # 限制最小压缩,单位字节,小于指定字节不会压缩。 gzip_min_length 1; #定义压缩的级别(压缩比,文件越大,压缩越多,但是cpu使用会越多) gzip_comp_level 3; #定义压缩文件的类型 gzip_types text/plain ap 阅读全文

posted @ 2020-06-13 13:44 work hard work smart 阅读(274) 评论(0) 推荐(0) 编辑

摘要: 1、配置静态前端工程 server { listen 80; server_name localhost; location / { root /home/files/uploadStaticResource/folder1; #root html; index index.html; } } fo 阅读全文

posted @ 2020-06-13 13:06 work hard work smart 阅读(456) 评论(0) 推荐(0) 编辑