Static pages also need to be protected by Spring-security

 

Some static pages need to be displayed correctly after the user is logged in. Such static pages should be protected with permissions

Not only .html requests are protected, .htm should be protected too

 

When the user is not logged in, refresh the static page, guide the customer to jump to the login page in the background, and display the static page correctly after logging in

 

 

<filter-mapping>
		<filter-name>springSecurityFilterChain</filter-name>
		<url-pattern>*.html</url-pattern>
		<url-pattern>*.htm</url-pattern>
		<url-pattern>/j_spring_cas_security_check</url-pattern>
	</filter-mapping>
	
	
	  <security:intercept-url pattern="/qbao_center_mc_index/mc_index.htm" access="hasAnyRole('ROLE_USER','ROLE_COMPANY_MERCHANT','ROLE_PERSONAL_MERCHANT','ROLE_COMPANY_MERCHANT_EMP')" />
		<security:intercept-url pattern="/qbao_center_mc_index/mc_index_e.htm" access="hasAnyRole('ROLE_USER','ROLE_COMPANY_MERCHANT','ROLE_PERSONAL_MERCHANT','ROLE_COMPANY_MERCHANT_EMP')" />
		<security:intercept-url pattern="/qbao_center_mc_index/mc_index_ew.htm" access="hasAnyRole('ROLE_USER','ROLE_COMPANY_MERCHANT','ROLE_PERSONAL_MERCHANT','ROLE_COMPANY_MERCHANT_EMP')" />
		<security:intercept-url pattern="/qbao_center_mc_index/mc_index_ne.htm" access="hasAnyRole('ROLE_USER','ROLE_COMPANY_MERCHANT','ROLE_PERSONAL_MERCHANT','ROLE_COMPANY_MERCHANT_EMP')" />
		<security:intercept-url pattern="/qbao_center_mc_index/mc_index_p.htm" access="hasAnyRole('ROLE_USER','ROLE_COMPANY_MERCHANT','ROLE_PERSONAL_MERCHANT','ROLE_COMPANY_MERCHANT_EMP')" />
		<security:intercept-url pattern="/qbao_center_mc_index/mc_index_pw.htm" access="hasAnyRole('ROLE_USER','ROLE_COMPANY_MERCHANT','ROLE_PERSONAL_MERCHANT','ROLE_COMPANY_MERCHANT_EMP')" />
       

 

 

---------------------------------------------------------------------------------------------

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326831763&siteId=291194637