Skip to content

Recommend allowed_tlds parameters using APP_ENV global variables #26

@AuroraLZDF

Description

@AuroraLZDF

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions