-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove permissions from cookie (#214)
* remove permissions from cookie
- Loading branch information
1 parent
08a0a8b
commit d6d43f7
Showing
11 changed files
with
135 additions
and
129 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
server/src/main/kotlin/org/tod87et/roomkn/server/plugins/CallLogging.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package org.tod87et.roomkn.server.plugins | ||
|
||
import io.ktor.server.application.Application | ||
import io.ktor.server.application.install | ||
import io.ktor.server.plugins.callloging.CallLogging | ||
import io.ktor.server.request.httpMethod | ||
import io.ktor.server.request.uri | ||
import org.slf4j.event.Level | ||
|
||
fun Application.configureCallLogging() { | ||
install(CallLogging) { | ||
level = Level.INFO | ||
format { call -> | ||
val status = call.response.status() | ||
val httpMethod = call.request.httpMethod.value | ||
val userAgent = call.request.headers["User-Agent"] | ||
val route = call.request.uri | ||
"Status: $status, HTTP method: $httpMethod, User agent: $userAgent, Route: $route" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.