commit iniziale
This commit is contained in:
parent
9e364c6696
commit
a40cafc383
46 changed files with 9556 additions and 1 deletions
23
app/Http/Controllers/CheckSimpleAuthController.php
Normal file
23
app/Http/Controllers/CheckSimpleAuthController.php
Normal file
|
@ -0,0 +1,23 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Route;
|
||||
|
||||
class CheckSimpleAuthController extends Controller
|
||||
{
|
||||
public function check(Request $req) {
|
||||
if (
|
||||
getenv('GITEA_ORGANIZATION') === $req->input('organizzazione')
|
||||
&&
|
||||
getenv('APP_PASSWORD') === $req->input('password')
|
||||
) {
|
||||
return view('backend', [
|
||||
'token' => getenv('GITEA_TOKEN')
|
||||
]);
|
||||
} else {
|
||||
return redirect('/');
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue