add cors headers to http proxy

This commit is contained in:
terminal
2022-04-21 12:40:14 +03:00
parent 4f1216b14f
commit c3285354c1
8 changed files with 45 additions and 1 deletions

View File

@@ -83,6 +83,8 @@ class ProxyConfigReaderSpec extends Specification {
act.port == 8080
act.preserveBatchOrder
act.routes.size() == 2
act.corsOrigin == "*"
act.corsAllowedHeaders == "Content-Type"
with(act.routes[0]) {
id == "ethereum"
blockchain == Chain.ETHEREUM

View File

@@ -31,6 +31,7 @@ class ProxyServerSpec extends Specification {
then:
1 * routes.post("/test", _)
1 * routes.options("/test", _)
1 * routes.ws("/test", _)
}

View File

@@ -3,6 +3,8 @@ proxy:
host: 0.0.0.0
port: 8080
preserve-batch-order: true
cors-origin: "*"
cors-allowed-headers: "Content-Type"
routes:
- id: ethereum
blockchain: ethereum