Recently, there is a problem with the project. When the client accesses the background, the path is missing. The background will definitely report an error of 404. However, at present, the client has no way to correct this error in a short time, so it can only modify it in the background java.xxxx.com/abc/auth/queryUserById . JSON
actual request – java.xxxx.com/auth/queryUserById .json
With spring cloud experience, you can see from this path that nginx and gateway are used
I have checked some methods on the Internet, mainly redirecting the request in nginx, but my request is post request. After redirection, it becomes get, and some parameters are lost
Finally, I tried many times. Finally, this situation can only be solved by reverse proxy
Location/auth/{
omit : http://xxx.xxxx.xxx : XXX (IP): port/auth /;
omit
…
}
This solves, but still wants to make complaints about the path of Tucao, and the mistake is too low.
Read More:
- NACOS error com.alibaba.nacos.api.exception.NacosException: failed to req API:/api//nacos/v1/ns/instance
- [Solved] com.alibaba.nacos.api.exception.NacosException: failed to req API
- Encapsulation of Axios and management of API interface in Vue
- Wechat third party authorization to generate QR code API
- Error when Java uses API to operate zookeeper
- [Solved] failed to req API:/nacos/v1/ns/instance after all servers
- ERROR Docker Engine API on Mac Osx
- HDFS Java API operation error (user permission)
- Change API level Android studio
- Gles2.0 Chinese API glgeterror
- Access restriction in Eclipse: the type ‘xxx’ is not API solution
- Caused by: java.lang.ClassNotFoundException: com.alibaba.nacos.api.naming.NamingMaintainService
- Google Maps API error: DeletedApiProjectMapError
- Nginx startup error: nginx: [error] open() “/ var / run / nginx/ nginx.pid The solution of “failed (2: no such file or directory)”
- “There was an internal API error” in Xcode debugging;
- Android API 27 and above use HTTP protocol request mode
- Quick solution org.gradle.api . tasks.TaskExecutionException : Execution failed for task ‘: app:compileJava ‘
- Webpack — module build failed: error: the node API for ‘Babel’ has been moved to Babel core
- How to Fix webpack Module build failed Error: The node API for ‘babel’ has been moved to babel-core
- nginx: [error] open() “/usr/local/nginx/logs/nginx.pid“ failed (2: No such file or directory)