Skip to content

Instantly share code, notes, and snippets.

@glekner
Last active January 5, 2019 14:44
Show Gist options
  • Save glekner/ce5ed8dc64390e91e577ed0ce87e976f to your computer and use it in GitHub Desktop.
Save glekner/ce5ed8dc64390e91e577ed0ce87e976f to your computer and use it in GitHub Desktop.
Foreman HTTP/2 Dev

Steps

  1. Add --early-hints to Puma, and --https to webpack-dev-server to .env e.g.
RAILS_STARTUP="puma -w 5 -p $PORT --preload --early-hints"
WEBPACK_OPTS="--https"
  1. change <meta http-equiv =" in base.html.erb to
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1 style-src 'self' http://* 'unsafe-inline'; script-src 'self' http://* 'unsafe-inline' 'unsafe-eval'">
  1. Add the next line to assets.rb

Rails.configuration.webpack.dev_server.https = true

Proxy

  1. Setup an HTTP/2 Proxy such as H2O. guide

Websockets

?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment