随笔分类 -  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 白首码农 阅读(1020) 评论(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 白首码农 阅读(4449) 评论(0) 推荐(1)