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
3
3
import org.springframework.boot.autoconfigure.SpringBootApplication
4
4
import org.springframework.boot.autoconfigure.web.servlet.error.ErrorMvcAutoConfiguration
5
5
import 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
+
6
12
7
13
@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
+ }
9
26
10
27
fun main () {
11
28
runApplication<Application >()
You can’t perform that action at this time.
0 commit comments