on the Internet, many methods of judging https are stereotyped.
mainly judges
reference links from $_ SERVER
to
https://blog.csdn.net/river13.
https://codeshelper.com/q/10.
but now nginx has done reverse proxy
$_ SERVER
without the following parameters:
HTTPS
HTTP_X_FORWARDED_PROTO
HTTP_FRONT_END_HTTPS
not even SERVER_PORT is 443
how to judge https?