摘要: 修改nginx.conf,禁止网络爬虫的ua,返回403 添加agent_deny.conf配置文件 #禁止Scrapy等工具的抓取 if ($http_user_agent ~* (Scrapy|Curl|HttpClient)) { return 403; } #禁止指定UA及UA为空的访问 i 阅读全文
posted @ 2020-02-12 17:46 enumx 阅读(697) 评论(0) 推荐(0) 编辑
摘要: 添加清除header信息 location /api/ { more_clear_headers "X-Powered-By"; more_clear_headers "Server"; more_clear_headers "ETag"; more_clear_headers "Connectio 阅读全文
posted @ 2020-02-12 17:38 enumx 阅读(5287) 评论(0) 推荐(0) 编辑
摘要: 复制以下代码 → 博客后台 → 设置 → 页面定制CSS代码 → 粘贴 #ad_t2,#cnblogs_c1,#under_post_news,#cnblogs_c2,#under_post_kb {display:none;!important} F12查看源码找到对应的id修改。 ad_t2: 阅读全文
posted @ 2020-02-12 16:18 enumx 阅读(137) 评论(0) 推荐(0) 编辑
摘要: gzip on; gzip_min_length 1k; gzip_buffers 4 16k; gzip_comp_level 2; gzip_types text/plain application/x-javascript text/css application/xml text/javas 阅读全文
posted @ 2020-02-12 13:31 enumx 阅读(474) 评论(0) 推荐(0) 编辑
摘要: 根据操作系统下载对应的软件包 https://golang.google.cn/dl/ GOROOT就是go的安装路径 vim /etc/profile,在末尾加上三行 ``` export GOROOT=/usr/local/goexport GOPATH=/home/goexport PATH= 阅读全文
posted @ 2020-02-12 03:00 enumx 阅读(162) 评论(0) 推荐(0) 编辑