Skip to content
New issue

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

反代时 API KEY 错误 #87

Open
Journalist-HK opened this issue Jan 9, 2025 · 0 comments
Open

反代时 API KEY 错误 #87

Journalist-HK opened this issue Jan 9, 2025 · 0 comments

Comments

@Journalist-HK
Copy link

Journalist-HK commented Jan 9, 2025

Nginx 反代配置

location /checkchan/ {
    proxy_pass http://172.18.0.4/; # docker 容器
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}

浏览器访问 https://api.example.com/checkchan?key=apiKEY 跳转 https://api.example.com/checkchan/?key=apiKEY ,返回正常。
插件中填写 https://api.example.com/checkchan 错误,填写 https://api.example.com/checkchan/ 提示不能加斜杠。

推测和结尾斜杠有关。

下面这种配置可以正常工作

location / {
    proxy_pass http://172.18.0.4; # docker 容器
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant