99i commited on
Commit
5be5fa4
·
verified ·
1 Parent(s): 5cd811b

Update Caddyfile

Browse files
Files changed (1) hide show
  1. Caddyfile +11 -2
Caddyfile CHANGED
@@ -8,9 +8,18 @@
8
 
9
  # 监听端口 80 和 443
10
  :3000 {
11
- # 代理 /hf/* 路径到根路径
 
 
 
 
12
  handle_path /hf/* {
13
  rewrite * /{path.relative}
14
- reverse_proxy http://localhost:11434
 
 
 
 
 
15
  }
16
  }
 
8
 
9
  # 监听端口 80 和 443
10
  :3000 {
11
+ @secure {
12
+ host {host}
13
+ protocol https
14
+ }
15
+ # 代理 /hf/* 路径到本地的相应路径,去掉 /hf/ 前缀
16
  handle_path /hf/* {
17
  rewrite * /{path.relative}
18
+ reverse_proxy {
19
+ to http://localhost:11434
20
+ # 可以添加 header 以调试
21
+ header_up X-Forwarded-Host {host}
22
+ header_up X-Forwarded-Proto {scheme}
23
+ }
24
  }
25
  }