aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/commands/server/server_command.rb
diff options
context:
space:
mode:
Diffstat (limited to 'railties/lib/rails/commands/server/server_command.rb')
-rw-r--r--railties/lib/rails/commands/server/server_command.rb8
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