dimanche 11 février 2018

laravel 5.5 - wildcard subdomain not working

I am upload my laravel app in the Apache shared hosting server and everything setup fine. I have CNAME record set up * subdomain and point it to the public_html/. then I set this code in my routes/web.php:

Route::domain('{subdomain}.example.com')->group(function () {
    Route::get('/', function ($subdomain) {
        Route::get('/profiles/sub/{subdomain}', 'ProfilesController@subDomain');
    });
});

which ProfilesController@subDomain is a function to process the parameter subdomain from the URL. But the result keep sending me to the main landing page. I notice there is this error:

Uncaught (in promise) DOMException: Only secure origins are allowed

which I am not sure if it is something to do with any part.

How can I resolve this?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire