HTTPS and HTTP2

Wolfy-J edited this page Sep 30, 2018 · 8 revisions

You can enable HTTPS and HTTP2 support by adding ssl section into http config.

http:
  # http host to listen.
  address:   0.0.0.0:8080

  ssl:
    # force redirect to https connection
    redirect: true

    # custom https port (default 443)
    port:     443

    # ssl cert
    cert:     server.crt

    # ssl private key
    key:      server.key

Redirecting HTTP to HTTPS

To enable automatic redirect from http:// to https:// set redirect option to true (disabled by default).

HTTP/2 Push Resources

RoadRunner support (HTTP/2 push)[https://en.wikipedia.org/wiki/HTTP/2_Server_Push] via virtual headers provided by PHP response.

return $response->withAddedHeader('http2-push', '/test.js');

Note that the resources path must be related to the public application directory and must include / at the beginning.

Please note, HTTP2 push only works under HTTPS with static service enabled.

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.