Updates CORS for non-localhost access
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
aarbit 2025-09-29 23:21:38 -05:00
parent 7ae491da43
commit 8a8a8f15b1
2 changed files with 14 additions and 1 deletions

View File

@ -0,0 +1,14 @@
package net.halfbinary.tmnt.config
import org.springframework.context.annotation.Configuration
import org.springframework.web.servlet.config.annotation.CorsRegistry
import org.springframework.web.servlet.config.annotation.EnableWebMvc
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer
@Configuration
@EnableWebMvc
class WebConfig : WebMvcConfigurer {
override fun addCorsMappings(registry: CorsRegistry) {
registry.addMapping("/**")
}
}

View File

@ -12,7 +12,6 @@ import org.springframework.web.bind.annotation.RestController
@RestController
@RequestMapping("/movies")
@CrossOrigin(origins = ["http://localhost:5173"])
class MoviesController(val moviesService: MoviesService) {
@GetMapping
fun getAllMovies(): List<MovieResponse> {