1.在deployerConfigContext.xml中,找到org.jasig.cas.authentication.handler.support.HttpBasedServiceCredentialsAuthenticationHandler的配置,加入屬性requireSecure並將其值設置爲false。
2.在WEB-INF/spring-configuration,將ticketGrantingTicketCookieGenerator、warnCookieGenerator 配置文件中的屬性 cookieSecure 的值改爲 false
重啓cas。
可選:
如果不希望看到這個提示:
則可以直接在WEB-INF\view\jsp\default\ui路徑下casLoginView中把一下代碼註釋即可:
<c:if test="${not pageContext.request.secure}">
<div id="msg" class="errors">
<h2>Non-secure Connection</h2>
<p>You are currently accessing CAS over a non-secure connection. Single Sign On WILL NOT WORK. In order to have single sign on work, you MUST log in over HTTPS.</p>
</div>
</c:if>