rymcu / forest

forest(森林)——一款现代化的知识社区后台项目,使用 SpringBoot + Shiro + MyBatis + JWT + Redis 实现
https://rymcu.com
MIT License
697 stars 133 forks source link

Sockjs+stomp 报跨越问题 #173

Closed mengshuodlut closed 3 months ago

mengshuodlut commented 3 months ago

在连接时报Access to XMLHttpRequest at 'http://localhost:3000/ws/info?t=1718968973857' from origin 'http://10.7.11.235:3000' has been blocked by CORS policy: The value of the 'Access-Control-Allow-Credentials' header in the response is '' which must be 'true' when the request's credentials mode is 'include'. The credentials mode of requests initiated by the XMLHttpRequest is controlled by the withCredentials attribute.问题

ronger-x commented 3 months ago

跨域问题请自行搜索 后端如何配置允许跨域