Skip to content

Commit

Permalink
Fix cors (#196)
Browse files Browse the repository at this point in the history
Co-authored-by: hfhbd <[email protected]>
  • Loading branch information
hfhbd and hfhbd authored May 5, 2021
1 parent e32db18 commit bd18ed0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions backend/src/jvmMain/kotlin/app/softwork/composetodo/main.kt
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ fun main() {
val db = Database.connect("jdbc:h2:mem:test;DB_CLOSE_DELAY=-1;", "org.h2.Driver")
val jwtProvider = JWTProvider(
Algorithm.HMAC512("secret"),
"app.softwork.composetodo",
"app.softwork.composetodo",
"app.softwork.todo",
"app.softwork.todo",
expireDuration = 10.minutes
)

embeddedServer(CIO) {
install(RateLimit)
install(CORS) {
host("composetodo.softwork.app", listOf("https"))
host("todo.softwork.app", listOf("https"))
host("localhost:8080")
allowCredentials = true
header(HttpHeaders.Authorization)
Expand Down

0 comments on commit bd18ed0

Please sign in to comment.