内置变量
server { listen 80; server_name cpu.enjoy.com; if ( $http_origin ~ http://(.*).enjoy.com){ set $allow_url $http_origin; } #1 location /var { echo $allow_url; echo ‘[host]=$host‘ ; echo ‘[http_HEADER]=$http_HEADER‘ ; echo ‘[remote_addr]=$remote_addr‘ ; echo ‘[remote_port]=$remote_port‘ ; echo ‘[request_method]=$request_method‘ ; echo ‘[request_uri]=$request_uri‘ ; echo ‘[scheme]=$scheme‘ ; echo ‘[server_name]=$server_name‘ ; echo ‘[server_protocol]=$server_protocol‘ ; echo ‘[uri]=$uri‘ ; echo ‘[http_origin]=$http_origin‘; echo ‘[http_user_agent]=$http_user_agent‘; echo ‘[request_filenameecho]=$request_filename‘; } }
原文地址:https://www.cnblogs.com/newlangwen/p/11160277.html
时间: 2024-10-11 01:56:42