We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
之前看到有人问,咋多SK-xxx随机,我今天问了下gpt半天好像成功搞出来了,分享给大家。
#默认未指定域名的多sk-xxx设置 split_clients "$remote_addr" $gptauth_random { 33% "Bearer sk-1111"; 33% "Bearer sk-222"; 34% "Bearer sk-333"; }
#默认sk-xxx调用及指定域名设置sk-111 map $http_host $gptauth { default $gptauth_random; #多域名指定sk-xxxx baidu.com "Bearer sk-aaaaa"; www.baidu.com "Bearer sk-bbbbb"; m.baidu.com "Bearer sk-ccccc"; }
另外,一个服务器里,多个同样的网站只需要在一个网站里设置这一部分即可,反向代理v1/需要每个网站单独设置。
#刚刚搞的自测成功好像没什么毛病,没人分享开心,分享给大家希望想用的能用到。如有什么毛病感谢指证!
The text was updated successfully, but these errors were encountered:
No branches or pull requests
之前看到有人问,咋多SK-xxx随机,我今天问了下gpt半天好像成功搞出来了,分享给大家。
#默认未指定域名的多sk-xxx设置
split_clients "$remote_addr" $gptauth_random {
33% "Bearer sk-1111";
33% "Bearer sk-222";
34% "Bearer sk-333";
}
#默认sk-xxx调用及指定域名设置sk-111
map $http_host $gptauth {
default $gptauth_random;
#多域名指定sk-xxxx
baidu.com "Bearer sk-aaaaa";
www.baidu.com "Bearer sk-bbbbb";
m.baidu.com "Bearer sk-ccccc";
}
另外,一个服务器里,多个同样的网站只需要在一个网站里设置这一部分即可,反向代理v1/需要每个网站单独设置。
#刚刚搞的自测成功好像没什么毛病,没人分享开心,分享给大家希望想用的能用到。如有什么毛病感谢指证!
The text was updated successfully, but these errors were encountered: