lib/toycol/const.rb in toycol-0.1.0 vs lib/toycol/const.rb in toycol-0.2.0

- old
+ new

@@ -1,8 +1,9 @@ # frozen_string_literal: true module Toycol + # For HTTP Protocol DEFAULT_HTTP_REQUEST_METHODS = %w[ GET HEAD POST OPTIONS @@ -75,7 +76,27 @@ 508 => "Loop Detected", 510 => "Not Extended", 511 => "Network Authentication Required" }.freeze + # For environment + ENVIRONMENT = ENV["RACK_ENV"] || "development" + DEFAULT_HOST = ENVIRONMENT == "development" ? "localhost" : "0.0.0.0" + + # For connection from proxy server to app server UNIX_SOCKET_PATH = ENV["TOYCOL_SOCKET_PATH"] || "/tmp/toycol.socket" + + # Rack compartible environment + PATH_INFO = "PATH_INFO" + QUERY_STRING = "QUERY_STRING" + REQUEST_METHOD = "REQUEST_METHOD" + SERVER_NAME = "SERVER_NAME" + SERVER_PORT = "SERVER_PORT" + CONTENT_LENGTH = "CONTENT_LENGTH" + RACK_VERSION = "rack.version" + RACK_INPUT = "rack.input" + RACK_ERRORS = "rack.errors" + RACK_MULTITHREAD = "rack.multithread" + RACK_MULTIPROCESS = "rack.multiprocess" + RACK_RUN_ONCE = "rack.run_once" + RACK_URL_SCHEME = "rack.url_scheme" end