🐛 Konfigurert aksesskontroll mot backend
Co-authored-by: Sindre Kjelsrud <sindre.kjelsrud@nav.no> Co-authored-by: Markus A. R. Johansen <markus.aleksander.rakil.johansen@nav.no>
This commit is contained in:
parent
6d5cffe8c2
commit
a8446b6b73
4 changed files with 14 additions and 9 deletions
|
@ -7,7 +7,7 @@ import no.nav.helse.sprik.plugins.*
|
|||
|
||||
fun main() {
|
||||
embeddedServer(Netty, port = 8080, host = "0.0.0.0", module = Application::module)
|
||||
.start(wait = true)
|
||||
.start(wait = true)
|
||||
}
|
||||
|
||||
fun Application.module() {
|
||||
|
|
|
@ -1,10 +1,16 @@
|
|||
package no.nav.helse.sprik.plugins
|
||||
|
||||
import io.ktor.http.*
|
||||
import io.ktor.server.routing.*
|
||||
import io.ktor.server.response.*
|
||||
import io.ktor.server.application.*
|
||||
import io.ktor.server.plugins.cors.routing.*
|
||||
|
||||
fun Application.configureRouting() {
|
||||
install(CORS) {
|
||||
anyHost()
|
||||
allowMethod(HttpMethod.Get)
|
||||
}
|
||||
routing {
|
||||
get("/") {
|
||||
call.respondText("Hello World!")
|
||||
|
|
Reference in a new issue