rails request.env的使用
@client_ip = request.env["HTTP_X_FORWARDED_FOR"] #取得使用者IP位址資訊
@client_browser = request.env["HTTP_USER_AGENT"] #取得使用者瀏覽器資訊
@http_referer = request.env["HTTP_REFERER"] #取得使用者來源(referer)
@client_language = request.env["HTTP_ACCEPT_LANGUAGE"] #取得使用者支援語系
@server_port = request.env["SERVER_PORT"]
@request_uri = request.env["REQUEST_URI"]
@content_length = request.env["CONTENT_LENGTH"].to_i
@rails_relative_url_root = request.env["RAILS_RELATIVE_URL_ROOT"]
@script_name = request.env["SCRIPT_NAME"]
@request_method = request.env["REQUEST_METHOD"]
@path_info = request.env["PATH_INFO"]
@query_string = request.env["QUERY_STRING"]
@server_software = request.env["SERVER_SOFTWARE"]
@https = request.env["HTTPS"]
@potocol = request.env["HTTP_X_FORWARDED_PROTO"]
@content_type = request.env["CONTENT_TYPE"]