摘要: 在http的功能里添加log_format模块,内容如下: log_format main escape=json '{ "@timestamp": "$time_iso8601", ' '"remote_addr": "$remote_addr",' '"request_time": "$requ 阅读全文
posted @ 2020-11-17 22:32 Terry- 阅读(719) 评论(0) 推荐(0)
摘要: 一、HTTP基本认证 Basic Authentication——当浏览器访问使用基本认证的网站的时候, 浏览器会提示你输入用户名和密码。 http auth的过程: 客户端发送http请求 服务器发现配置了http auth,于是检查request里面有没有"Authorization"的http 阅读全文
posted @ 2020-11-17 21:45 Terry- 阅读(614) 评论(0) 推荐(0)
摘要: package Factory import "fmt" type Restaurant interface { GetFood() } type Donglaishun struct { } func (d *Donglaishun) GetFood() { fmt.Println("东来顺的饭菜 阅读全文
posted @ 2020-11-17 15:57 Terry- 阅读(88) 评论(0) 推荐(0)