Skip to content

Commit

Permalink
Add proxy docs
Browse files Browse the repository at this point in the history
  • Loading branch information
sy-records committed Oct 11, 2023
1 parent fbb231d commit e5b7d41
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions docs/gateway/nginx.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,38 @@ server {

- [配置 Websocket Wss 代理](/code/websocket.md)

### 微信图片

```conf
# http://mmbiz.qpic.cn/mmbiz_png/2lUhY9SosBGOtQLz66sZrjlyoqIT3A9sVeU7YQcVlpbZ9GicFkmM8Ctht1bFhXvPp7Uhtj0fU4JlRakqn4ViaspA/0?wx_fmt=png
# /mmbiz_png/2lUhY9SosBGOtQLz66sZrjlyoqIT3A9sVeU7YQcVlpbZ9GicFkmM8Ctht1bFhXvPp7Uhtj0fU4JlRakqn4ViaspA/0
location ~ /(.*)mmbiz(.*)/ {
if ($http_referer !~* ^https://qq52o.me) {
return 403;
}
proxy_pass http://mmbiz.qpic.cn;
proxy_set_header Host "mmbiz.qpic.cn";
proxy_set_header Referer "";
}
```

### CSDN 头像

```conf
# https://profile-avatar.csdnimg.cn/f9dd455bf70d483299fb65e2e840d359_kaiyuanshe.jpg
# /avatar-csdnimg/f9dd455bf70d483299fb65e2e840d359_kaiyuanshe.jpg
location /avatar-csdnimg/ {
if ($http_referer !~* ^https://qq52o.me) {
return 403;
}
proxy_pass https://profile-avatar.csdnimg.cn/;
proxy_set_header Host "profile-avatar.csdnimg.cn";
proxy_set_header Referer "";
}
```

## 伪静态

```conf
Expand Down

0 comments on commit e5b7d41

Please sign in to comment.