summaryrefslogtreecommitdiff
path: root/.rr.yaml
diff options
context:
space:
mode:
authorAnton Titov <[email protected]>2019-06-24 12:49:43 +0300
committerGitHub <[email protected]>2019-06-24 12:49:43 +0300
commit464baf2eb7bd87ed80332280e8f73faa2d495746 (patch)
tree93838ae9f56525983980a3f76ab60febfdfcf3d7 /.rr.yaml
parent85126b000d140efdd99573e44241ee1e8b84d3c5 (diff)
parent3b16dd837a203fc4865e94a031b64a83080e12ef (diff)
Merge pull request #164 from ovr/middlewares-headers
Middlewares headers
Diffstat (limited to '.rr.yaml')
-rw-r--r--.rr.yaml22
1 files changed, 22 insertions, 0 deletions
diff --git a/.rr.yaml b/.rr.yaml
index 198f777b..6565a4da 100644
--- a/.rr.yaml
+++ b/.rr.yaml
@@ -28,6 +28,28 @@ http:
# ssl private key
key: server.key
+ # HTTP service provides built-in middlewares
+ middlewares:
+ # Middleware to handle CORS requests, https://www.w3.org/TR/cors/
+ cors:
+ # https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Origin
+ AllowedOrigin: "*"
+ # https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Headers
+ allowedHeaders: "*"
+ # https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Methods
+ allowedMethods: "GET,POST,PUT,DELETE"
+ # https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Credentials
+ allowCredentials: true
+ # https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Expose-Headers
+ exposedHeaders: "Cache-Control,Content-Language,Content-Type,Expires,Last-Modified,Pragma"
+ maxAge: 600
+ # Middleware that adding Headers to the Request / Response
+ headers:
+ customRequestHeaders:
+ "Example-Request-Header": "Value"
+ customResponseHeaders:
+ "X-Powered-By": "RoadRunner"
+
# HTTP service provides FastCGI as frontend
fcgi:
# FastCGI connection DSN. Supported TCP and Unix sockets.