Open sitole opened 3 years ago
Same issue here
hi, i had same issue i had to hack it by adding the following:
@Component
open class CorsConfiguration : OncePerRequestFilter() {
override fun doFilterInternal(
httpServletRequest: HttpServletRequest,
httpServletResponse: HttpServletResponse,
filterChain: FilterChain
) {
httpServletResponse.addHeader("Access-Control-Allow-Origin", "*")
httpServletResponse.addHeader("Access-Control-Allow-Headers", "*")
httpServletResponse.addHeader("Access-Control-Allow-Methods", "*")
filterChain.doFilter(httpServletRequest, httpServletResponse);
}
}
after adding those go to api-gateway and enable cors per endpoint (its a pain)
Hello, i want to connect my frontend website with Spring Kotless deployed in Lambda function, but Kotless and API gateway does not accept OPTIONS HTTP request for CORS check.