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

I think should always use $_SERVER['HTTP_HOST'] #280

Closed
fatindeed opened this issue Oct 24, 2018 · 2 comments
Closed

I think should always use $_SERVER['HTTP_HOST'] #280

fatindeed opened this issue Oct 24, 2018 · 2 comments

Comments

@fatindeed
Copy link

fatindeed commented Oct 24, 2018

phpCAS/source/CAS/Client.php

Lines 3588 to 3592 in 6846e00

if (empty($_SERVER['SERVER_NAME'])) {
$server_url = $_SERVER['HTTP_HOST'];
} else {
$server_url = $_SERVER['SERVER_NAME'];
}

my nginx conf

server {
listen 80 default_server;
server_name .mydomain.com;
....
}

then when I open https://first.second.mydomain.com/, $_SERVER['SERVER_NAME'] will be mydomain.com, and $_SERVER['HTTP_HOST'] will be first.second.mydomain.com.

@fatindeed fatindeed changed the title I thinks should always use $_SERVER['HTTP_HOST'] I think should always use $_SERVER['HTTP_HOST'] Oct 24, 2018
@jfritschi
Copy link
Contributor

Please have a look at #234. We already had some discussion in this topic.

Happy to hear your arguments aside from "make it work for my case" :-)

@jfritschi
Copy link
Contributor

Closing this as duplicate

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