File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -64,6 +64,13 @@ private function normalizeOptions(array $options = []): array
64
64
}
65
65
}
66
66
67
+ // Transform wildcard pattern
68
+ foreach ($ options ['allowedOrigins ' ] as $ origin ) {
69
+ if (strpos ($ origin , '* ' ) !== false ) {
70
+ $ options ['allowedOriginsPatterns ' ][] = $ this ->convertWildcardToPattern ($ origin );
71
+ }
72
+ }
73
+
67
74
// normalize array('*') to true
68
75
if (in_array ('* ' , $ options ['allowedOrigins ' ])) {
69
76
$ options ['allowedOrigins ' ] = true ;
@@ -80,13 +87,6 @@ private function normalizeOptions(array $options = []): array
80
87
$ options ['allowedMethods ' ] = array_map ('strtoupper ' , $ options ['allowedMethods ' ]);
81
88
}
82
89
83
- // Transform wildcard pattern
84
- foreach ($ options ['allowedOrigins ' ] as $ origin ) {
85
- if (strpos ($ origin , '* ' ) !== false ) {
86
- $ options ['allowedOriginsPatterns ' ][] = $ this ->convertWildcardToPattern ($ origin );
87
- }
88
- }
89
-
90
90
return $ options ;
91
91
}
92
92
You can’t perform that action at this time.
0 commit comments