Quellcode durchsuchen

changed web.php and VerifyCsrfToken.php

Maksimus111 vor 5 Jahren
Ursprung
Commit
ca3f2ae5af
2 geänderte Dateien mit 11 neuen und 1 gelöschten Zeilen
  1. 8 1
      app/Http/Middleware/VerifyCsrfToken.php
  2. 3 0
      routes/web.php

+ 8 - 1
app/Http/Middleware/VerifyCsrfToken.php

@@ -19,6 +19,13 @@ class VerifyCsrfToken extends Middleware
      * @var array
      */
     protected $except = [
-        //
+       // '869244226:'
     ];
+
+     public function __construct(\Illuminate\Foundation\Application $app, \Illuminate\Contracts\Encryption\Encrypter $encrypter)
+    {
+        $this->app = $app;
+        $this->encrypter = $encrypter;
+        $this->except[] = \Telegram::getAccessToken();
+    }
 }

+ 3 - 0
routes/web.php

@@ -27,3 +27,6 @@ Route::post('/tbot/'.Telegram::getAccessToken(), function(){
     Telegram::commandsHandler(true);
 });
 
+Route::post(Telegram::getAccessToken(), function () {
+	Telegram::commandsHandler(true);
+});