记一次关于网关的问题及修复问题。
项目提测后,修改时web端页面出现502,查看后台服务日志发现:
org.springframework.web.multipart.MultipartException: Failed to parse multipart servlet request; nested exception is java.io.IOException: org.apache.tomcat.util.http.fileupload.FileUploadException: Unexpected EOF read on the socket
后面经过排查,是网关将后台接口拦截了,在服务器对应网关里配置白名单后,接口可正常操作。
zuul:
shouldFilter: openapi,captchaImage,authenticate,sendVcode,upload,companiesInfo,faq,loginStatus,register,importTemplate,download,avatar,importData,importExamRecord,image,export,import,storageAccount