request.env["HTTP_REFERER"]
可以取到的参数包括:
SERVER_NAME: localhost
PATH_INFO: /forum/forums
HTTP_USER_AGENT: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en) AppleWebKit/522.11 (KHTML, like Gecko) Version/3.0.2 Safari/522.12
HTTP_ACCEPT_ENCODING: gzip, deflate
SCRIPT_NAME: /
SERVER_PROTOCOL: HTTP/1.1
HTTP_HOST: localhost:3000
HTTP_CACHE_CONTROL: max-age=0
HTTP_ACCEPT_LANGUAGE: en
REMOTE_ADDR: 127.0.0.1
SERVER_SOFTWARE: Mongrel 1.1.3
REQUEST_PATH: /forum/forums
HTTP_REFERER: http://localhost:3000/
HTTP_COOKIE: _matchsession=BAh7BzoMY3NyZl9pZCIlNWJiNzg4NDUzOWQzNWFhZTQ4MGRkNTUwYzc0MDc5%250AZGYiCmZsYXNoSUM6J0FjdGlvbkNvbnRyb2xsZXI6OkZsYXNoOjpGbGFzaEhh%250Ac2h7AAY6CkB1c2VkewA%253D268e6091590591d959128f3b17b62ff46244a0a3; _slemail=temp%40email.com; _slhash=9dfd86431742273e3e96e06a1c20541d69f74dc9; _haha_session=BAh7BiIKZmxhc2hJQzonQWN0aW9uQ29udHJvbGxlcjo6Rmxhc2g6OkZsYXNo%250ASGFzaHsABjoKQHVzZWR7AA%253D%253D--96565e41694dc839bd244af40b5d5121a923c8e3
HTTP_VERSION: HTTP/1.1
REQUEST_URI: /forum/forums
SERVER_PORT: "3000"
GATEWAY_INTERFACE: CGI/1.2
HTTP_ACCEPT: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
HTTP_CONNECTION: keep-alive
REQUEST_METHOD: GET
可以取到的参数包括:
SERVER_NAME: localhost
PATH_INFO: /forum/forums
HTTP_USER_AGENT: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en) AppleWebKit/522.11 (KHTML, like Gecko) Version/3.0.2 Safari/522.12
HTTP_ACCEPT_ENCODING: gzip, deflate
SCRIPT_NAME: /
SERVER_PROTOCOL: HTTP/1.1
HTTP_HOST: localhost:3000
HTTP_CACHE_CONTROL: max-age=0
HTTP_ACCEPT_LANGUAGE: en
REMOTE_ADDR: 127.0.0.1
SERVER_SOFTWARE: Mongrel 1.1.3
REQUEST_PATH: /forum/forums
HTTP_REFERER: http://localhost:3000/
HTTP_COOKIE: _matchsession=BAh7BzoMY3NyZl9pZCIlNWJiNzg4NDUzOWQzNWFhZTQ4MGRkNTUwYzc0MDc5%250AZGYiCmZsYXNoSUM6J0FjdGlvbkNvbnRyb2xsZXI6OkZsYXNoOjpGbGFzaEhh%250Ac2h7AAY6CkB1c2VkewA%253D268e6091590591d959128f3b17b62ff46244a0a3; _slemail=temp%40email.com; _slhash=9dfd86431742273e3e96e06a1c20541d69f74dc9; _haha_session=BAh7BiIKZmxhc2hJQzonQWN0aW9uQ29udHJvbGxlcjo6Rmxhc2g6OkZsYXNo%250ASGFzaHsABjoKQHVzZWR7AA%253D%253D--96565e41694dc839bd244af40b5d5121a923c8e3
HTTP_VERSION: HTTP/1.1
REQUEST_URI: /forum/forums
SERVER_PORT: "3000"
GATEWAY_INTERFACE: CGI/1.2
HTTP_ACCEPT: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
HTTP_CONNECTION: keep-alive
REQUEST_METHOD: GET