Explorar o código

fix: get real-ip instead of vercel edge network ip

Illusion hai 1 ano
pai
achega
c282433095
Modificáronse 1 ficheiros con 20 adicións e 1 borrados
  1. 20 1
      vercel.json

+ 20 - 1
vercel.json

@@ -1,5 +1,24 @@
 {
     "github": {
         "silent": true
-    }
+    },
+    "headers": [
+        {
+            "source": "/(.*)",
+            "headers": [
+                {
+                    "key": "X-Real-IP",
+                    "value": "$remote_addr"
+                },
+                {
+                    "key": " X-Forwarded-For",
+                    "value": "$proxy_add_x_forwarded_for"
+                },
+                {
+                    "key": "Host",
+                    "value": "$http_host"
+                }
+            ]
+        }
+    ]
 }