summaryrefslogtreecommitdiff
path: root/.rr.yaml
diff options
context:
space:
mode:
authorDmitry Patsura <[email protected]>2019-06-20 14:26:33 +0300
committerDmitry Patsura <[email protected]>2019-06-20 14:26:33 +0300
commit878f2d546969e522a9bf5a964f626e3b823ce9a0 (patch)
tree70f77bb4f17421d869d5f476954b4325b86fb34c /.rr.yaml
parent4a94c0cb578e5dca6bb43d60127121a16e7217b2 (diff)
Feature(http): Introduce CORS middleware
Diffstat (limited to '.rr.yaml')
-rw-r--r--.rr.yaml9
1 files changed, 7 insertions, 2 deletions
diff --git a/.rr.yaml b/.rr.yaml
index c04daaff..b1886909 100644
--- a/.rr.yaml
+++ b/.rr.yaml
@@ -30,13 +30,18 @@ http:
# HTTP service provides built-in middlewares
middlewares:
+ # Middleware to handle CORS requests
+ cors:
+ AllowedOrigin: "*"
+ allowedHeaders: "*"
+ allowedMethods: "GET,POST,PUT,DELETE"
+ allowCredentials: true
+ maxAge: 600
# Middleware that adding Headers to the Request / Response
headers:
customRequestHeaders:
"Example-Request-Header": "Value"
customResponseHeaders:
- "Access-Control-Allow-Origin": "*"
- "Access-Control-Allow-Headers": "GET,POST,PUT,DELETE"
"X-Powered-By": "RoadRunner"
# HTTP service provides FastCGI as frontend