我使用的是一个App Search实例和一个基于Elastic SearchUi示例的node.js用户界面。我正在反向代理node.js应用程序,并使用Apache2连接到app Search API。我无法让它发挥作用。我收到错误消息:出现意外错误:无法读取未定义的属性"forEach"我认为这意味着搜索有效载荷没有通过,但我不是100%肯定的。
我的反向代理配置的相关部分是:
SSLProxyEngine On
ProxyRequests Off
ProxyPreserveHost On
ProxyVia Full
Header always set Access-Control-Allow-Origin "*"
Header always set Access-Control-Allow-Credentials false
Header always set Access-Control-Allow-Methods "POST, GET, OPTIONS"
Header always set Access-Control-Allow-Headers "Accept, authorization, content-type, Host, Origin, x-swiftype-client, x-swiftype-client-version, x-swiftype-integration, x-swiftype-integration-version"
# Added a rewrite to respond with a 200 SUCCESS on every OPTIONS request.
RewriteEngine On
RewriteCond %{REQUEST_METHOD} OPTIONS
RewriteRule ^(.*)$ $1 [R=200,L]
ProxyPass / https://127.0.0.1:5000/
ProxyPass /api/ https://127.0.0.1:3200/
ProxyPassReverse / https://127.0.0.1:5000/
ProxyPassReverse /api/ https://127.0.0.1:3200/
提前Thanx获取任何建议
问题在于ProxyPass/Reverse语句的顺序。