fix: render valid CORS Nginx directives
This commit is contained in:
@@ -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));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user