options("/*"){request, response ->
response.header("Access-Control-Allow-Headers",request.headers("Access-Control-Request-Headers"));
response.header("Access-Control-Allow-Methods",request.headers("Access-Control-Request-Method"));
}
before("*"){req, res ->
res.header("Access-Control-Allow-Origin", "*");
}
Habilitar CORS con Kotlin
Be the first to comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.