XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet
公开
关注 0 Fork 0 Star 0
返回提交历史

XFEstudio/gpt4free

Fix nginx rate limiting configuration in documentation

Co-authored-by: hlohaus <983577+hlohaus@users.noreply.github.com>

7fb733c8
copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
提交于

代码差异

1 个文件 +16 -3
Modified docs/reverse-proxy.md +16 -3
@@ -543,6 +543,21 @@ Note: Binding to `127.0.0.1:8080` ensures the service is only accessible locally
543 543
544 544 ### 2. Configure Nginx with HTTPS
545 545
546 First, add the rate limit zone to your main nginx configuration `/etc/nginx/nginx.conf` in the `http` block:
547
548 ```nginx
549 http {
550 # ... other http settings ...
551
552 # Rate limiting zone
553 limit_req_zone $binary_remote_addr zone=api_limit:10m rate=10r/s;
554
555 # ... rest of http block ...
556 }
557 ```
558
559 Then create the site configuration `/etc/nginx/sites-available/gpt4free`:
560
546 561 ```nginx
547 562 # /etc/nginx/sites-available/gpt4free
548 563 server {
@@ -565,10 +580,8 @@ server {
565 580 add_header X-Content-Type-Options "nosniff" always;
566 581 add_header X-Frame-Options "DENY" always;
567 582
568 # Rate limiting
569 limit_req_zone $binary_remote_addr zone=api_limit:10m rate=10r/s;
570
571 583 location / {
584 # Apply rate limiting
572 585 limit_req zone=api_limit burst=20 nodelay;
573 586
574 587 proxy_pass http://127.0.0.1:8080;