From 38e739c5c4828fc453b3be8d05dd0fb7ac668f0d Mon Sep 17 00:00:00 2001 From: Alexander Nozik Date: Sat, 3 Sep 2022 15:40:37 +0300 Subject: [PATCH] Add forward headers --- src/main/kotlin/ru/mipt/spc/Application.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/kotlin/ru/mipt/spc/Application.kt b/src/main/kotlin/ru/mipt/spc/Application.kt index 5ecbba0..a855c87 100644 --- a/src/main/kotlin/ru/mipt/spc/Application.kt +++ b/src/main/kotlin/ru/mipt/spc/Application.kt @@ -3,6 +3,7 @@ package ru.mipt.spc import io.ktor.server.application.Application import io.ktor.server.application.install import io.ktor.server.plugins.forwardedheaders.ForwardedHeaders +import io.ktor.server.plugins.forwardedheaders.XForwardedHeaders import space.kscience.snark.SnarkEnvironment import space.kscience.snark.ktor.extractResources import space.kscience.snark.ktor.prepareSnarkDataCacheDirectory @@ -14,6 +15,7 @@ import kotlin.io.path.div fun Application.spcModule() { // install(HttpsRedirect) install(ForwardedHeaders) + install(XForwardedHeaders) val dataPath = Path.of("data")