File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change 2424 "php" : " ^8.4" ,
2525 "ext-ctype" : " *" ,
2626 "ext-iconv" : " *" ,
27+ "ext-apcu" : " *" ,
2728 "algolia/algoliasearch-client-php" : " ^3.0" ,
2829 "babdev/pagerfanta-bundle" : " ^4.2" ,
2930 "beelab/recaptcha2-bundle" : " ^2.3" ,
Original file line number Diff line number Diff line change @@ -51,12 +51,16 @@ public function onRequest(RequestEvent $event): void
5151 }
5252
5353 // valid origin
54- if ($ event ->getRequest ()->headers ->get ('Origin ' ) === 'https:// ' .$ this ->packagistHost ) {
54+ $ origin = $ event ->getRequest ()->headers ->get ('Origin ' ) ?? '' ;
55+ if ($ origin === 'https:// ' .$ this ->packagistHost ) {
5556 return ;
5657 }
5758
5859 // valid as well with HTTP in dev
59- if ('dev ' === $ this ->environment && $ event ->getRequest ()->headers ->get ('Origin ' ) === 'http:// ' .$ this ->packagistHost ) {
60+ $ scheme = parse_url ($ origin , PHP_URL_SCHEME );
61+ $ host = parse_url ($ origin , PHP_URL_HOST );
62+ $ knownOrigin = $ scheme .':// ' .$ host ;
63+ if ('dev ' === $ this ->environment && $ knownOrigin === 'http:// ' .$ this ->packagistHost ) {
6064 return ;
6165 }
6266
You can’t perform that action at this time.
0 commit comments