geqintan commited on
Commit
9d27e34
·
1 Parent(s): a3b1dd5
Files changed (2) hide show
  1. get_will_trim_path.lua +0 -2
  2. nginx.conf +4 -0
get_will_trim_path.lua DELETED
@@ -1,2 +0,0 @@
1
- ngx.say("/v1/https/generativelanguage.googleapis.com/")
2
- return "/v1/https/generativelanguage.googleapis.com/"
 
 
 
nginx.conf CHANGED
@@ -35,6 +35,10 @@ http {
35
  }
36
  proxy_pass $target_proto://$target_host$target_path;
37
  proxy_set_header Host $target_host;
 
 
 
 
38
  }
39
  }
40
  }
 
35
  }
36
  proxy_pass $target_proto://$target_host$target_path;
37
  proxy_set_header Host $target_host;
38
+ # 设置其他常用的请求头
39
+ proxy_set_header X-Real-IP $remote_addr;
40
+ # proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
41
+ proxy_set_header X-Forwarded-Proto $scheme;
42
  }
43
  }
44
  }