Fix https detection for nginx