Skip to content

Commit

Permalink
If shared secret is not set. Do not try to enforce it.
Browse files Browse the repository at this point in the history
  • Loading branch information
Thiritin committed Aug 25, 2023
1 parent d4c2b24 commit e20b3e9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
5 changes: 1 addition & 4 deletions app/Http/Middleware/EnsureSharedSecretIsSetMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,7 @@ class EnsureSharedSecretIsSetMiddleware
{
public function handle(Request $request, Closure $next)
{
if(\App::isLocal()) return $next($request);
if (empty(config('app.shared_secret'))) {
abort(403, 'Shared secret is not set in config, aborting.');
}
if(\App::isLocal() || empty(config('app.shared_secret'))) return $next($request);

$sharedSecret = $request->get('shared_secret');
if (empty($sharedSecret) || $sharedSecret !== config('app.shared_secret')) {
Expand Down
2 changes: 1 addition & 1 deletion vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import legacy from '@vitejs/plugin-legacy'
export default defineConfig({
build: {
manifest: true,
target: 'es2015',
target: 'chrome70',
},
plugins: [
laravel({
Expand Down

0 comments on commit e20b3e9

Please sign in to comment.