#HTTP
server{
resolver 8.8.8.8
access_log /data/logs/nginx/access_proxy.log main
listen 80
location / {
root html
index index.html
是否https
function is_https(){
if ( ! empty($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) !== 'off')
{
return TRUE
}
elseif (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https')
{
return TRUE
}
elseif ( ! empty($_SERVER['HTTP_FRONT_END_HTTPS']) && strtolower($_SERVER['HTTP_FRONT_END_HTTPS']) !== 'off')
{
return TRUE
}
return FALSE
}
欢迎分享,转载请注明来源:夏雨云
评论列表(0条)