Add forward headers

This commit is contained in:
Alexander Nozik 2022-09-03 15:40:37 +03:00
parent 6d3d0420dd
commit 38e739c5c4
No known key found for this signature in database
GPG Key ID: F7FCF2DD25C71357

View File

@ -3,6 +3,7 @@ package ru.mipt.spc
import io.ktor.server.application.Application import io.ktor.server.application.Application
import io.ktor.server.application.install import io.ktor.server.application.install
import io.ktor.server.plugins.forwardedheaders.ForwardedHeaders import io.ktor.server.plugins.forwardedheaders.ForwardedHeaders
import io.ktor.server.plugins.forwardedheaders.XForwardedHeaders
import space.kscience.snark.SnarkEnvironment import space.kscience.snark.SnarkEnvironment
import space.kscience.snark.ktor.extractResources import space.kscience.snark.ktor.extractResources
import space.kscience.snark.ktor.prepareSnarkDataCacheDirectory import space.kscience.snark.ktor.prepareSnarkDataCacheDirectory
@ -14,6 +15,7 @@ import kotlin.io.path.div
fun Application.spcModule() { fun Application.spcModule() {
// install(HttpsRedirect) // install(HttpsRedirect)
install(ForwardedHeaders) install(ForwardedHeaders)
install(XForwardedHeaders)
val dataPath = Path.of("data") val dataPath = Path.of("data")