fix: render valid CORS Nginx directives

This commit is contained in:
root
2026-09-04 23:02:47 +02:00
parent 8413e5c340
commit 41a0791901
3 changed files with 7 additions and 4 deletions
+3 -1
View File
@@ -22,11 +22,13 @@ final class OriginTest extends TestCase
public function testItRejectsPathsAndUnsafeOriginForms(): void
{
foreach (['*', 'null', 'https://aifrequency.org/path', 'https://[email protected]', 'file:///tmp/a'] as $origin) {
$rejected = false;
try {
Origin::normalize($origin);
self::fail(sprintf('%s should be rejected.', $origin));
} catch (InvalidArgumentException) {
$rejected = true;
}
self::assertTrue($rejected, sprintf('%s should be rejected.', $origin));
}
}
}