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

Recommend allowed_tlds parameters using APP_ENV global variables #26

Open
AuroraLZDF opened this issue Nov 9, 2017 · 0 comments
Open

Comments

@AuroraLZDF
Copy link

AuroraLZDF commented Nov 9, 2017

I had the same problem #21 ,and try to modify allowed_tlds array, but no resolve.
So I found the following code:

protected function getRequestTld()
    {
        $requestHost = parse_url(Request::url())['host'];
        $exploded = explode('.', $requestHost);
        $requestTld = end($exploded);

        return $requestTld;
    }

protected function tldIsAllowed()
    {
        $requestTld = $this->getRequestTld();
        $allowedTlds = Config::get('sudosu.allowed_tlds');

        return in_array($requestTld, $allowedTlds);
    }

that line code return in_array($requestTld, $allowedTlds); show to use the domain name suffix.
/(ㄒoㄒ)/~~
So I would suggest using the APP_ENV variable.

(The end, Please excuse my poor English expression)

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

No branches or pull requests

1 participant