File tree Expand file tree Collapse file tree 1 file changed +18
-1
lines changed
src/main/kotlin/no/nav/klage/document Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -3,9 +3,26 @@ package no.nav.klage.document
33import org.springframework.boot.autoconfigure.SpringBootApplication
44import org.springframework.boot.autoconfigure.web.servlet.error.ErrorMvcAutoConfiguration
55import org.springframework.boot.runApplication
6+ import org.springframework.context.annotation.Bean
7+ import org.springframework.web.servlet.config.annotation.CorsRegistry
8+ import org.springframework.web.servlet.config.annotation.WebMvcConfigurer
9+
10+
11+
612
713@SpringBootApplication(exclude = [ErrorMvcAutoConfiguration ::class ])
8- class Application
14+ class Application {
15+
16+ @Bean
17+ fun corsConfigurer (): WebMvcConfigurer ? {
18+ return object : WebMvcConfigurer {
19+ override fun addCorsMappings (registry : CorsRegistry ) {
20+ registry.addMapping(" /*" ).allowedOrigins(" *" ).allowedMethods(" *" )
21+ }
22+ }
23+ }
24+
25+ }
926
1027fun main () {
1128 runApplication<Application >()
You can’t perform that action at this time.
0 commit comments