Skip to content

Commit 952d42d

Browse files
committed
fix forwarded headers
1 parent f9b4aa5 commit 952d42d

File tree

1 file changed

+4
-1
lines changed
  • server/src/main/kotlin/cloud/skadi/gist/plugins

1 file changed

+4
-1
lines changed

server/src/main/kotlin/cloud/skadi/gist/plugins/HTTP.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,10 @@ fun Application.configureHTTP() {
2525
}
2626
}
2727
install(ForwardedHeaderSupport) // WARNING: for security, do not include this if not behind a reverse proxy
28-
install(XForwardedHeaderSupport) // WARNING: for security, do not include this if not behind a reverse proxy
28+
install(XForwardedHeaderSupport) {
29+
this.hostHeaders.clear()
30+
this.hostHeaders.add(HttpHeaders.XForwardedHost)
31+
}
2932
install(ContentNegotiation) {
3033
jackson()
3134
}

0 commit comments

Comments
 (0)