Skip to content
Snippets Groups Projects
web.php 1.12 KiB
Newer Older
  • Learn to ignore specific revisions
  • <?php
    
    /*
    |--------------------------------------------------------------------------
    | Web Routes
    |--------------------------------------------------------------------------
    |
    | Here is where you can register web routes for your application. These
    | routes are loaded by the RouteServiceProvider within a group which
    | contains the "web" middleware group. Now create something great!
    |
    
    Dominik Hebeler's avatar
    Dominik Hebeler committed
     */
    
    
    Route::get('/', function () {
    
    Dominik Hebeler's avatar
    Dominik Hebeler committed
        $url      = "https://facebook.de";
        $password = md5(env('PROXY_PASSWORD') . $url);
        $target   = urlencode(base64_encode(str_rot13($url)));
        return "<a href=\"" . action('ProxyController@proxyPage', ['password' => $password, 'url' => $target]) . "\">$url</a>";
        return md5(env('PROXY_PASSWORD') . "https://metager.de") . "<br>\n" . urlencode(base64_encode(str_rot13('https://metager.de')));
        #return redirect('https://metager.de');
    });
    
    Route::get('{password}/{url}', 'ProxyController@proxyPage')->middleware('checkpw');
    
    Route::group(['prefix' => 'proxy/{password}', 'middleware' => ['checkpw:true']], function ($password) {
    
        Route::get('{url}', 'ProxyController@proxy')->where(['url' => '.*']);