kamerazugriff wieder möglich + anleitung zum erlauben des kamerazugriffs
This commit is contained in:
@@ -100,4 +100,29 @@ class SecurityHeadersTest extends TestCase
|
||||
app()->detectEnvironment(fn () => $originalEnv);
|
||||
}
|
||||
}
|
||||
|
||||
public function test_guest_pwa_allows_camera_via_permissions_policy(): void
|
||||
{
|
||||
$originalEnv = app()->environment();
|
||||
app()->detectEnvironment(fn () => 'production');
|
||||
config([
|
||||
'app.debug' => false,
|
||||
'app.url' => 'https://test-y0k0.fotospiel.app',
|
||||
'security_headers.force_hsts' => true,
|
||||
]);
|
||||
|
||||
Route::middleware('web')->get('/e/test-token', fn () => response('ok'));
|
||||
|
||||
try {
|
||||
$response = $this->withServerVariables([
|
||||
'HTTPS' => 'on',
|
||||
'HTTP_ORIGIN' => 'https://test-y0k0.fotospiel.app',
|
||||
])->get('/e/test-token');
|
||||
|
||||
$response->assertOk();
|
||||
$response->assertHeader('Permissions-Policy', 'camera=(self), microphone=(), geolocation=()');
|
||||
} finally {
|
||||
app()->detectEnvironment(fn () => $originalEnv);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user