class ActionDispatch::Request
def send_early_hints(links)
If you are using +javascript_include_tag+ or +stylesheet_link_tag+ the
send_early_hints("Link" => "; rel=preload; as=style\n; rel=preload")
The +send_early_hints+ method accepts a hash of links as follows:
If the env contains +rack.early_hints+ then the server accepts HTTP2 push for Link headers.
making preparations for processing the final response.
Early Hints is an HTTP/2 status code that indicates hints to help a client start
def send_early_hints(links) return unless env["rack.early_hints"] env["rack.early_hints"].call(links) end