diff options
author | Eileen M. Uchitelle <eileencodes@users.noreply.github.com> | 2017-10-04 09:48:36 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-04 09:48:36 -0400 |
commit | bd2542b74fe528d95f51d8f3668b0f7d6d8af974 (patch) | |
tree | 9a0fbb2d0fe7c978172aede8117401cbf3b48b36 /railties/lib/rails | |
parent | df2814671cce80fd0d8f290e5a70bf518880d6fa (diff) | |
parent | 59a02fb7bcbe68f26e1e7fdcec45c00c66e4a065 (diff) | |
download | rails-bd2542b74fe528d95f51d8f3668b0f7d6d8af974.tar.gz rails-bd2542b74fe528d95f51d8f3668b0f7d6d8af974.tar.bz2 rails-bd2542b74fe528d95f51d8f3668b0f7d6d8af974.zip |
Merge pull request #30744 from eileencodes/early-hints
Implement H2 Early Hints for Rails
Diffstat (limited to 'railties/lib/rails')
-rw-r--r-- | railties/lib/rails/commands/server/server_command.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/railties/lib/rails/commands/server/server_command.rb b/railties/lib/rails/commands/server/server_command.rb index 785265d766..5b5037d3de 100644 --- a/railties/lib/rails/commands/server/server_command.rb +++ b/railties/lib/rails/commands/server/server_command.rb @@ -127,6 +127,7 @@ module Rails class_option "dev-caching", aliases: "-C", type: :boolean, default: nil, desc: "Specifies whether to perform caching in development." class_option "restart", type: :boolean, default: nil, hide: true + class_option "early_hints", type: :boolean, default: nil, desc: "Enables HTTP/2 early hints." def initialize(args = [], local_options = {}, config = {}) @original_options = local_options @@ -161,7 +162,8 @@ module Rails daemonize: options[:daemon], pid: pid, caching: options["dev-caching"], - restart_cmd: restart_command + restart_cmd: restart_command, + early_hints: early_hints } end end @@ -227,6 +229,10 @@ module Rails "bin/rails server #{@server} #{@original_options.join(" ")} --restart" end + def early_hints + options[:early_hints] + end + def pid File.expand_path(options[:pid]) end |