kamerazugriff wieder möglich + anleitung zum erlauben des kamerazugriffs

This commit is contained in:
Codex Agent
2025-12-20 17:43:40 +01:00
parent 80985828d8
commit d4c7d3f93a
5 changed files with 113 additions and 377 deletions

View File

@@ -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);
}
}
}