add cors headers to http proxy
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -31,6 +31,7 @@ class ProxyServerSpec extends Specification {
|
||||
|
||||
then:
|
||||
1 * routes.post("/test", _)
|
||||
1 * routes.options("/test", _)
|
||||
1 * routes.ws("/test", _)
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user