Skip to content

Commit 6bdf975

Browse files
committed
CORS test
1 parent ec41e22 commit 6bdf975

File tree

2 files changed

+2
-13
lines changed

2 files changed

+2
-13
lines changed

src/main/kotlin/no/nav/klage/document/Application.kt

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,7 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurer
1111

1212

1313
@SpringBootApplication(exclude = [ErrorMvcAutoConfiguration::class])
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-
}
14+
class Application
2615

2716
fun main() {
2817
runApplication<Application>()

src/main/kotlin/no/nav/klage/document/api/DocumentController.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import org.springframework.web.bind.annotation.*
1414
import java.util.*
1515

1616
@RestController
17-
@CrossOrigin(methods = [RequestMethod.GET, RequestMethod.DELETE, RequestMethod.HEAD, RequestMethod.POST, RequestMethod.OPTIONS, RequestMethod.PUT])
17+
//@CrossOrigin(methods = [RequestMethod.GET, RequestMethod.DELETE, RequestMethod.HEAD, RequestMethod.POST, RequestMethod.OPTIONS, RequestMethod.PUT])
1818
@Api(tags = ["kabal-smart-editor-api"])
1919
@RequestMapping("/documents")
2020
class DocumentController(

0 commit comments

Comments
 (0)