remove jsessionid in url rewrite in spring mvc

前端 未结 5 1610
深忆病人
深忆病人 2021-01-31 19:20

I am using spring MVC and having a problem in jsessionid, what I found is that jsessionid is injected in the url if cookies isn\'t enabled in the browser producing a url like th

5条回答
  •  天命终不由人
    2021-01-31 19:55

    I would insert a filter that if it detects a bot (like googlebot) uses a custom HttpServletResponse which overrides the encodeUrl methods to simply return the raw URL. If the filter does not detect a bot it would simply let the chain continue which should let url encoding etc continue as per the default.

提交回复
热议问题