10-04-2026
This commit is contained in:
parent
4d6b4930b2
commit
4bb89aad8c
836 changed files with 52961 additions and 5950 deletions
|
|
@ -37,8 +37,14 @@ class BasicAuthMiddleware
|
|||
return $next($request);
|
||||
}
|
||||
|
||||
// Skip Basic Auth für Display-API und Short-Links (öffentlicher Zugriff für Display-Seite)
|
||||
if ($request->is('api/display/*') || $request->is('_cabinet/*')) {
|
||||
// Skip Basic Auth für Display-API, Cabinet-Tablet-API und Short-Links (öffentlicher Zugriff für Display-Seiten)
|
||||
// Skip Basic Auth für Display-API, Cabinet-Tablet-API und Short-Links (öffentlicher Zugriff für Display-Seiten)
|
||||
if (
|
||||
$request->is('api/display/*') || $request->is('api/cabinet-tablet/*') || $request->is('_cabinet/*') ||
|
||||
str_contains($request->url(), 'portal.b2in.test') || str_contains($request->url(), 'portal.b2in.eu') ||
|
||||
str_contains($request->url(), 'b2in.test') || str_contains($request->url(), 'b2in.eu')
|
||||
|
||||
) {
|
||||
return $next($request);
|
||||
}
|
||||
|
||||
|
|
|
|||
21
app/Http/Middleware/SetLocale.php
Normal file
21
app/Http/Middleware/SetLocale.php
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Middleware;
|
||||
|
||||
use Closure;
|
||||
use Illuminate\Http\Request;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
|
||||
class SetLocale
|
||||
{
|
||||
public function handle(Request $request, Closure $next): Response
|
||||
{
|
||||
$locale = session('locale');
|
||||
|
||||
if ($locale && in_array($locale, ['de', 'en'])) {
|
||||
app()->setLocale($locale);
|
||||
}
|
||||
|
||||
return $next($request);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue