feat(security): 允许匿名访问看板相关接口和页面

- 添加了多个与看板相关的接口路径到 permitAll() 方法,允许匿名访问
- 包括基础监控信息列表、柜子数量统计、报警记录统计等接口
- 同时允许匿名访问 "/board/**" 路径下的所有页面
IOT
zch 3 months ago
parent 05d3dc76af
commit f332e2d984

@ -23,7 +23,7 @@ import com.ruoyi.framework.security.handle.LogoutSuccessHandlerImpl;
/**
* spring security
*
*
* @author ruoyi
*/
@EnableMethodSecurity(prePostEnabled = true, securedEnabled = true)
@ -35,7 +35,7 @@ public class SecurityConfig
*/
@Autowired
private UserDetailsService userDetailsService;
/**
*
*/
@ -53,7 +53,7 @@ public class SecurityConfig
*/
@Autowired
private JwtAuthenticationTokenFilter authenticationTokenFilter;
/**
*
*/
@ -116,6 +116,16 @@ public class SecurityConfig
.antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**").permitAll()
.antMatchers("/swagger-ui.html", "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**"
,"/record/**").permitAll()
// 允许匿名访问看板接口
.antMatchers("/ems/base/baseMonitorInfo/list").permitAll()
.antMatchers("/base/baseCabinetInfo/countCabinet").permitAll()
.antMatchers("/record/recordBusbarAlarm/recordBusbarAlarmCount").permitAll()
.antMatchers("/ems/record/recordIOTInstant/selectLastTWTempertureData").permitAll()
.antMatchers("/record/recordBusbarTemp/boardTempList").permitAll()
// 允许匿名访问 看板 下所有页面
.antMatchers("/board/**").permitAll()
// 除上面外的所有请求全部需要鉴权认证
.anyRequest().authenticated();
})

Loading…
Cancel
Save