From ae4db5435180c44b37f521c463b17f2023ac1d8c Mon Sep 17 00:00:00 2001 From: wayne <wayne8692wayne8692@gmail.com> Date: 星期五, 18 二月 2022 09:25:50 +0800 Subject: [PATCH] [update] 若顧問停用時,將無法登入 (文案待確認) --- pamapi/src/main/java/com/pollex/pam/config/SecurityConfiguration.java | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-) diff --git a/pamapi/src/main/java/com/pollex/pam/config/SecurityConfiguration.java b/pamapi/src/main/java/com/pollex/pam/config/SecurityConfiguration.java index dc7cd2d..0b995e0 100644 --- a/pamapi/src/main/java/com/pollex/pam/config/SecurityConfiguration.java +++ b/pamapi/src/main/java/com/pollex/pam/config/SecurityConfiguration.java @@ -69,24 +69,30 @@ .and() .referrerPolicy(ReferrerPolicyHeaderWriter.ReferrerPolicy.STRICT_ORIGIN_WHEN_CROSS_ORIGIN) .and() - .permissionsPolicy().policy("camera=(), fullscreen=(self), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), midi=(), payment=(), sync-xhr=()") + .featurePolicy("geolocation 'none'; midi 'none'; sync-xhr 'none'; microphone 'none'; camera 'none'; magnetometer 'none'; gyroscope 'none'; fullscreen 'self'; payment 'none'") .and() .frameOptions() .deny() .and() .sessionManagement() - .sessionCreationPolicy(SessionCreationPolicy.STATELESS) + .sessionCreationPolicy(SessionCreationPolicy.IF_REQUIRED) .and() .authorizeRequests() .antMatchers("/api/authenticate").permitAll() .antMatchers("/api/register").permitAll() .antMatchers("/api/activate").permitAll() + .antMatchers("/api/testLogin/**").permitAll() + .antMatchers("/api/test/sendMsg/**").permitAll() + .antMatchers("/api/otp/**").permitAll() + .antMatchers("/api/login/validate/**").permitAll() + .antMatchers("/api/eService/authenticate").permitAll() .antMatchers("/api/account/reset-password/init").permitAll() .antMatchers("/api/account/reset-password/finish").permitAll() .antMatchers("/api/consultant/recommend").permitAll() .antMatchers("/api/consultant/detail").permitAll() .antMatchers("/api/consultant/fastQuery").permitAll() .antMatchers("/api/consultant/strictQuery").permitAll() + .antMatchers("/api/consultant/avatar/**").permitAll() .antMatchers("/api/admin/**").hasAuthority(AuthoritiesConstants.ADMIN) .antMatchers("/api/**").authenticated() .antMatchers("/websocket/**").authenticated() -- Gitblit v1.8.0