From 64c6b49a45590f121d72648c960701f299c321d0 Mon Sep 17 00:00:00 2001 From: Jwhyee Date: Wed, 28 Sep 2022 00:56:33 +0900 Subject: [PATCH] [REFACTOR] #176 - Main page available without login --- .../com/matdongsan/infra/SecurityConfig.java | 3 +- .../resources/templates/fragments/header.html | 288 ++---------------- 2 files changed, 23 insertions(+), 268 deletions(-) diff --git a/src/main/java/com/matdongsan/infra/SecurityConfig.java b/src/main/java/com/matdongsan/infra/SecurityConfig.java index 375752c4..89040fd1 100644 --- a/src/main/java/com/matdongsan/infra/SecurityConfig.java +++ b/src/main/java/com/matdongsan/infra/SecurityConfig.java @@ -24,8 +24,7 @@ protected void configure(HttpSecurity http) throws Exception { // 카카오 맵 외부 요청을 받 .csrf().disable() // /api/place 로 보내지지가 않아서 설정 .authorizeRequests() - .mvcMatchers("/login", "/signup", "/account/idCheck", "/account/kakao/**").permitAll() // 누구나 접근 가능 - .antMatchers("/manager/*").hasAnyRole("ADMIN") // ADMIN만 접근 가능 + .mvcMatchers("/login", "/signup", "/account/idCheck", "/account/kakao/**", "/", "/place", "/place/map", "/posts", "/post/**").permitAll() // 누구나 접근 가능 .anyRequest().authenticated(); // 나머지 요청은 권한이 있어야함 http.logout() .logoutUrl("/logout") diff --git a/src/main/resources/templates/fragments/header.html b/src/main/resources/templates/fragments/header.html index e2248ac1..5a58ec3b 100644 --- a/src/main/resources/templates/fragments/header.html +++ b/src/main/resources/templates/fragments/header.html @@ -19,286 +19,42 @@
  • 맛집 리뷰 추가
  • - -