diff --git a/app/Http/Middleware/HeaderAuth.php b/app/Http/Middleware/HeaderAuth.php
index 6c8e432..3f8d2d3 100644
--- a/app/Http/Middleware/HeaderAuth.php
+++ b/app/Http/Middleware/HeaderAuth.php
@@ -15,7 +15,7 @@ class HeaderAuth
*/
public function handle(Request $request, Closure $next): Response
{
- if (hash_equals(config('bot.header_auth'), $request->header('X-BOTAUTH'))) {
+ if (!hash_equals(config('bot.header_auth'), $request->header('X-BOTAUTH'))) {
return response('Unauthorized', 401);
}
diff --git a/config/bot.php b/config/bot.php
index 47d5738..db07d63 100644
--- a/config/bot.php
+++ b/config/bot.php
@@ -2,5 +2,5 @@
return [
'webhook' => env('BOT_SLACK_WEBHOOK_URL', ''),
- 'header_auth' => env('BOT_SLACK_WEBHOOK_URL', ''),
+ 'header_auth' => env('BOT_X_BOTAUTH', ''),
];
diff --git a/resources/views/admin/send.blade.php b/resources/views/admin/send.blade.php
new file mode 100644
index 0000000..92f6f6c
--- /dev/null
+++ b/resources/views/admin/send.blade.php
@@ -0,0 +1,9 @@
+