随笔分类 -  Nginx

Nginx记录POST请求参数,并以Json格式记录日志
摘要:配制nginx.conf http { log_format main escape=json '{' '"timestamp": "$time_iso8601",' '"http_x_real_ip": "$http_x_real_ip",' '"http_x_forwarded_for": "$ 阅读全文

posted @ 2022-03-23 16:46 白首码农 阅读(972) 评论(0) 推荐(0) 编辑

Nginx设置Access-Control-Allow-Origin多域名跨域
摘要:修改配置文件 可通过如下配制进行多域名的设置。 map $http_origin $corsHost { default 0; "~https://www.itbiancheng.com" https://www.itbiancheng.com; "~http://love.itbiancheng. 阅读全文

posted @ 2022-03-23 16:43 白首码农 阅读(4373) 评论(0) 推荐(1) 编辑

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

统计

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