We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a0c6752 commit 32ad18fCopy full SHA for 32ad18f
src/CorsService.php
@@ -54,8 +54,8 @@ private function normalizeOptions(array $options = []): array
54
'maxAge' => 0,
55
];
56
57
- if (!is_array($options['exposedHeaders'])) {
58
- throw new \RuntimeException("CORS option `exposed_headers` should be `false` or an array");
+ if ($options['exposedHeaders'] && !is_array($options['exposedHeaders'])) {
+ throw new \RuntimeException("CORS option `exposedHeaders` should be `false` or an array");
59
}
60
61
foreach (['allowedOrigins', 'allowedOriginsPatterns', 'allowedHeaders', 'allowedMethods'] as $key) {
0 commit comments