Skip to content

Commit

Permalink
docs: update dazBlog.go's README
Browse files Browse the repository at this point in the history
Signed-off-by: daz-3ux <[email protected]>
  • Loading branch information
Daz-3ux committed Sep 16, 2023
1 parent f0b5338 commit 1bb720a
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion internal/dazBlog/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,20 @@
## web 服务框架
- 使用 `gin` 框架
- HTTP 请求处理流程
[HTTP 请求处理流程](../resource/HTTP.jpg)
[HTTP 请求处理流程](../resource/HTTP.jpg)

## 中间件
- 使用 `gin` 框架的中间件

## 跨域
- 同源策略需同时满足以下三个条件
- 协议相同
- HTTP
- HTTPS
- 域名相同
- 端口相同
- 使用 Cors 中间件解决跨域问题

## 优雅关停
- 将监听函数放在一个 goroutine 中,使用 channel 通知 goroutine 关停
- 收到信号后 10s 内关闭服务(10s 内将未处理完的请求处理完毕)

0 comments on commit 1bb720a

Please sign in to comment.