Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

merge develop to main #33

Merged
merged 24 commits into from
Aug 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
c9e039a
feat: 공지사항 생성, 공지사항 읽기 기능 추가 (#1)
skfotakf Jul 25, 2023
f849a63
chore: .idea 디렉토리 삭제
leeeryboy Jul 26, 2023
54ef587
chore: PR 템플릿 생성 (#2)
leeeryboy Jul 23, 2023
3a92906
feat: 로컬 db용 docker-compose 파일 추가 및 application.yaml 수정 (#4)
leeeryboy Jul 26, 2023
c2f7ef8
feat: 공지사항 수정, 삭제, 태그 기능 추가 (#3)
skfotakf Jul 28, 2023
227a385
feat: 구성원(교수) 생성 및 조회 API 구현 (#8)
leeeryboy Jul 31, 2023
92a8e8b
Docs: Swagger 추가 (#7)
huGgW Jul 31, 2023
00566f2
feat: 페이지네이션+검색 기능 추가 (#5)
skfotakf Aug 1, 2023
38de652
CICD: 배포 자동화 (#6)
huGgW Aug 1, 2023
1a75adf
feat: 구성원(교수) 수정 및 삭제 API (#9)
leeeryboy Aug 5, 2023
42249ba
feat: 구성원(행정직원) CRUD API (#10)
leeeryboy Aug 5, 2023
41bb4fd
feat: news 패키지 추가, 디벨롭 및 프론트에 맞게 엔티티 변경 (#12)
skfotakf Aug 8, 2023
3bbccb9
Merge branch 'main' into develop
leeeryboy Aug 8, 2023
7e3ea8e
fix: main에서 develop으로 pr (#16)
skfotakf Aug 9, 2023
6c5afe2
feat: seminar 패키지 추가 (#17)
skfotakf Aug 11, 2023
a550011
hotfix: 불필요한 dto 삭제 (#20)
skfotakf Aug 11, 2023
e2b3dec
fix: 이미지 uri 필드 추가 및 프론트 요구사항 반영 (#21)
leeeryboy Aug 14, 2023
0813562
feat: introduction 패키지, undergraduate 패키지 추가 (#22)
skfotakf Aug 15, 2023
cffac41
feat: admissions, research 패키지 추가 (#23)
skfotakf Aug 15, 2023
21b7dd7
Merge branch 'main' into develop
leeeryboy Aug 16, 2023
d2c341c
feat: oidc 로그인 (#27)
leeeryboy Aug 22, 2023
e05b5ad
feat: cors 설정 (#30)
leeeryboy Aug 22, 2023
bf61a06
Merge branch 'main' into develop
leeeryboy Aug 22, 2023
28fa788
fix: cors 추가 설정 (#32)
leeeryboy Aug 22, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ import org.springframework.security.core.Authentication
import org.springframework.security.web.SecurityFilterChain
import org.springframework.security.web.authentication.logout.LogoutSuccessHandler
import org.springframework.security.web.authentication.logout.SimpleUrlLogoutSuccessHandler
import org.springframework.web.client.RestTemplate
import org.springframework.web.cors.CorsConfiguration
import org.springframework.web.cors.CorsConfigurationSource
import org.springframework.web.cors.UrlBasedCorsConfigurationSource



@Configuration
Expand All @@ -23,6 +26,8 @@ class SecurityConfig(
@Bean
fun filterChain(http: HttpSecurity): SecurityFilterChain {
return http.csrf().disable()
.cors()
.and()
.oauth2Login()
.loginPage("/oauth2/authorization/idsnucse")
.userInfoEndpoint().oidcUserService(customOidcUserService).and()
Expand Down Expand Up @@ -54,4 +59,16 @@ class SecurityConfig(
}
}

@Bean
fun corsConfigurationSource(): CorsConfigurationSource {
val configuration = CorsConfiguration()
configuration.allowedOrigins = listOf("http://localhost:3000", "http://cse-dev-waffle.bacchus.io:3000")
configuration.allowedMethods = listOf("*")
configuration.allowedHeaders = listOf("*")
configuration.maxAge = 3000
val source = UrlBasedCorsConfigurationSource()
source.registerCorsConfiguration("/**", configuration)
return source
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package com.wafflestudio.csereal.common.config

import org.springframework.context.annotation.Configuration
import org.springframework.web.servlet.config.annotation.CorsRegistry
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer

@Configuration
class WebConfig : WebMvcConfigurer {

override fun addCorsMappings(registry: CorsRegistry) {
registry.addMapping("/**")
.allowedOrigins("http://localhost:3000", "http://cse-dev-waffle.bacchus.io:3000")
.allowedMethods("*")
.allowedHeaders("*")
.maxAge(3000)
}

}