diff --git a/nginx.conf b/nginx.conf index cb8bcfc..d2d3298 100755 --- a/nginx.conf +++ b/nginx.conf @@ -9,6 +9,7 @@ http { default_type application/octet-stream; sendfile on; keepalive_timeout 65; + client_max_body_size 1024m; lua_shared_dict cache 10m; #换成你的实际路径,这里将源码中src目录加入到 lua_package_path @@ -42,6 +43,8 @@ http { access.dispatch() } proxy_set_header Host $newhost; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_http_version 1.1; proxy_pass $upstream; } @@ -50,4 +53,4 @@ http { #将源码中的 manage.conf 路径 include /usr/local/openresty/nginx/proxygateway/manage.conf; -} \ No newline at end of file +}