|
|
- location ^~ /
* r" s* G0 D$ \$ ]( \ - {
6 J( J: d( H, g% Y5 X8 A - proxy_pass http://localhost:13000;+ c/ K& X' j" o/ @# x
- proxy_set_header Host $host;
4 D7 u7 J& z# v# |5 ]2 R' q6 Z - proxy_set_header X-Real-IP $remote_addr;; ^- {( b4 S& }0 j9 @6 s$ G
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;4 y' _4 y2 z1 L
- proxy_set_header X-Forwarded-Proto $scheme;
$ A. b! Y5 V' c. ^* z0 Q ~! K - proxy_set_header X-Forwarded-Host $http_host;
5 F- B/ l2 C2 B; ]/ j1 ^ - proxy_set_header X-Forwarded-Port $server_port;
+ ]& H# v( g7 Q - proxy_set_header REMOTE-HOST $remote_addr;
2 `4 B; q0 X( H2 L; Z, w x - proxy_set_header REMOTE-PORT $remote_port;" @9 E' z$ }4 ]8 @
- proxy_set_header Upgrade $http_upgrade;
9 q$ B$ n! w1 P' O/ t" y8 C0 P! { - proxy_set_header Connection $connection_upgrade;+ o& S$ U3 ?- b/ V X
- proxy_http_version 1.1;- e8 ^+ h& e4 k* P) O6 S
- add_header X-Cache $upstream_cache_status;$ |- c$ t3 e% Y8 {& J+ p
- / q+ u* v* [3 x% Q* T; }% M
- set $static_fileL7Oj3VcR 0;
+ z2 R; s* _! X3 I3 B1 P2 Y7 _# G - if ($uri ~* "\.(gif|png|jpg|css|js|woff|woff2)$") {
- l4 I8 [- C. X) s - set $static_fileL7Oj3VcR 1;/ o5 |7 U8 q2 ~4 v$ u
- expires 1m;
7 K( T/ l5 d! I' k - }) u Q" b* y4 h% `: V# T% [
- if ($static_fileL7Oj3VcR = 0) {
9 C& U6 X, z5 H2 F9 q - add_header Cache-Control no-cache;
) r) C, W5 |4 R# {9 t - }* Q2 I/ \7 M p! O" f6 f
- }
复制代码 |
|