This repository has been archived by the owner on Nov 15, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
70fe550
commit 407b114
Showing
9 changed files
with
11 additions
and
32 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
11 changes: 2 additions & 9 deletions
11
amazon/core/src/main/kotlin/org/http4k/connect/amazon/AwsReverseProxy.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 |
---|---|---|
@@ -1,19 +1,12 @@ | ||
package org.http4k.connect.amazon | ||
|
||
import org.http4k.core.HttpHandler | ||
import org.http4k.routing.bind | ||
import org.http4k.routing.header | ||
import org.http4k.routing.routes | ||
import org.http4k.routing.reverseProxy | ||
|
||
/** | ||
* Simple ReverseProxy for AWS services. Allows for simple traffic splitting based | ||
* on the Host header. | ||
*/ | ||
fun AwsReverseProxy(vararg awsServices: Pair<AwsServiceCompanion, HttpHandler>) = | ||
routes( | ||
*awsServices.map { it.first.awsService.value to it.second }.toTypedArray() | ||
.map { service -> | ||
header("host") { it.contains(service.first) } bind service.second | ||
}.toTypedArray() | ||
) | ||
reverseProxy(*awsServices.map { it.first.awsService.value to it.second }.toTypedArray()) | ||
|
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
15 changes: 0 additions & 15 deletions
15
core/client/src/main/kotlin/org/http4k/connect/ConnectJsonAdapterFactory.kt
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8-all.zip | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |