File tree 2 files changed +7
-1
lines changed
2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ dependencies {
12
12
implementation(Ktor .server.netty)
13
13
implementation(Ktor .server.callLogging)
14
14
implementation(Ktor .server.auth)
15
+ implementation(Ktor .server.hsts)
15
16
implementation(Ktor .plugins.serialization)
16
17
17
18
implementation(KotlinX .serialization.core)
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import io.ktor.server.auth.*
5
5
import io.ktor.server.engine.*
6
6
import io.ktor.server.netty.*
7
7
import io.ktor.server.plugins.callloging.*
8
+ import io.ktor.server.plugins.hsts.*
8
9
import io.ktor.server.response.*
9
10
import io.ktor.server.routing.*
10
11
import kotlinx.datetime.Clock
@@ -55,7 +56,11 @@ fun Application.formulaide() {
55
56
}
56
57
}
57
58
58
- if (developmentMode) {
59
+ if (! developmentMode) {
60
+ install(HSTS ) {
61
+ includeSubDomains = true
62
+ }
63
+ } else {
59
64
log.error(" DEVELOPMENT MODE IS ENABLED. THIS IS NOT SAFE FOR PRODUCTION." )
60
65
}
61
66
You can’t perform that action at this time.
0 commit comments