I used the WeChat public account platform a few days ago. The callback address can be configured in the developer tools, and WeChat will push some events back to the developer through this address. The URL needs to be authenticated when configuring for the first time. To put it simply, it sends a string to the server specified by the URL, and then the server must return a certain string in the string, which is echostr.
I use Nginx here, and ng is transferred to tomcat, so just return echostr directly in ng. Specific configuration:
location /kmgw/{
proxy_pass .......
proxy_type default;
return 200 $arg_echostr
}
The above introduces the direct return of nginx, including the content of nginx. I hope it will be helpful to friends who are interested in PHP tutorials.