Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

_isHttps bug? #230

Open
xxlv opened this issue May 2, 2017 · 1 comment
Open

_isHttps bug? #230

xxlv opened this issue May 2, 2017 · 1 comment

Comments

@xxlv
Copy link

xxlv commented May 2, 2017

Client.php line:3617

  if (!empty($_SERVER['HTTP_X_FORWARDED_PROTO'])) {
            return ($_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https');
        } elseif (!empty($_SERVER['HTTP_X_FORWARDED_PROTOCOL'])) {
            return ($_SERVER['HTTP_X_FORWARDED_PROTOCOL'] === 'https');
        } elseif ( isset($_SERVER['HTTPS'])
            && !empty($_SERVER['HTTPS'])
            && strcasecmp($_SERVER['HTTPS'], 'off') !== 0
        ) {
            return true;
        }
        return false;

sometimes , domain may cross two proxy layers . so the HTTP_X_FORWARDED_PROTO
will be set "https,https". i think , the project should support this state :)

@jfritschi
Copy link
Contributor

Might make sense to check if the variable begins with 'https' since this is the only relevant part I would think.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants