企业🤖AI Agent构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
配置 nginx 反向代理步骤如下: **1. `%nginx_home%/conf/nginx.conf`** ```conf http { ... server { ... location ^~/cors01/ { add_header Access-Control-Allow-Origin *; add_header Access-Control-Allow-Headers X-Requested-With; add_header Access-Control-Allow-Methods GET,POST,PUT,DELETE,OPTIONS; if ($request_method = 'OPTIONS') { return 204; } proxy_pass http://127.0.0.1:8080/; } } } ``` **2. 通过nginx访问真正的服务** 访问 nginx 地址:http://localhost:80/cors01/index/message 就会调用服务 http://localhost:8080/index/message 。