diff options
author | Valery Piashchynski <[email protected]> | 2021-09-10 15:46:02 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2021-09-10 15:46:02 +0300 |
commit | 8fa86886bd5b3c12cf161fb2c1cdd9a2cd53d1bf (patch) | |
tree | 852269ac09c0bcefba6e508fc04263dc061fa87b /docs/http/headers.md | |
parent | 8b70fb48b2b0a9451d9b82a17ac2f4cd8a1f561e (diff) |
Remove docs
Signed-off-by: Valery Piashchynski <[email protected]>
Diffstat (limited to 'docs/http/headers.md')
-rw-r--r-- | docs/http/headers.md | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/docs/http/headers.md b/docs/http/headers.md deleted file mode 100644 index 97bc0cb3..00000000 --- a/docs/http/headers.md +++ /dev/null @@ -1,37 +0,0 @@ -# Headers and CORS -RoadRunner can automatically set up request/response headers and control CORS for your application. - -### CORS -To enable CORS headers add the following section to your configuration. - -```yaml -http: - address: 127.0.0.1:44933 - middleware: ["headers"] - # ... - headers: - cors: - allowed_origin: "*" - allowed_headers: "*" - allowed_methods: "GET,POST,PUT,DELETE" - allow_credentials: true - exposed_headers: "Cache-Control,Content-Language,Content-Type,Expires,Last-Modified,Pragma" - max_age: 600 -``` - -> Make sure to declare "headers" middleware. - -### Custom headers for Response or Request -You can control additional headers to be set for outgoing responses and headers to be added to the request sent to your application. -```yaml -http: - # ... - headers: - # Automatically add headers to every request passed to PHP. - request: - Example-Request-Header: "Value" - - # Automatically add headers to every response. - response: - X-Powered-By: "RoadRunner" -``` |