Пример #1
0
 public static function generateLogoutUrl()
 {
     return Config::get("custom.base_url") . "/facebook/logout?returnuri=" . urlencode(URLHelpers::getPath());
 }
Пример #2
0
*/
Route::filter('homeRedirect', function () {
    $redirectUrl = Config::get("custom.home_redirect_url");
    if (is_null($redirectUrl)) {
        // no url to redirect to
        return;
    }
    if (Route::current()->getUri() !== "/") {
        // not home page
        return;
    }
    if (isset($_GET['noRedirect']) || trim($SERVER["HTTP_USER_AGENT"]) === "Facebot") {
        // if noRedirect param in url, or facebook crawler, so disable redirection
        return;
    }
    if (URLHelpers::hasInternalReferrer()) {
        // don't redirect if getting here from another location on the site
        return;
    }
    return Redirect::to($redirectUrl);
});
/*
|--------------------------------------------------------------------------
| CSRF Protection Filter
|--------------------------------------------------------------------------
|
| The CSRF filter is responsible for protecting your application against
| cross-site request forgery attacks. If this special token in a user
| session does not match the one given in this request, we'll bail.
|
*/