原文:springboot Invalid character found in the request target. The valid characters are defined in RFC 7230 and RFC 3986

報錯如下: 在請求目標中發現無效字符。有效字符在RFC 和RFC 中定義。 原因是Tomcat在 . . , . . , . . 版本后,添加了對於http頭的驗證。 就是添加了些規則去限制HTTP頭的規范性 解決方法如下: 還可以修改tomcat配置文件 在Tomcat的安裝目錄中,打開conf server.xml文件,找到 lt Connector gt 節點 只需在剛剛的 lt Conne ...

2019-10-28 16:22 0 1081 推薦指數:

查看詳情

解決springboot項目請求出現非法字符問題 java.lang.IllegalArgumentException:Invalid character found in the request target. The valid characters are defined in RFC

springboot版本: 2.1.5 最近使用springboot搭建了一個App后台服務的項目,開發接口的時候在本機使用postman工具做請求測試,請求返回一直很正常,但是在前端開發使用h5請求后台服務的時候,前台請求400,瀏覽器提示請求跨域 但是我在提供接口請求的入口處做了跨域處理 ...

Sat Jul 20 00:19:00 CST 2019 1 5245
 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM