php-cors icon indicating copy to clipboard operation
php-cors copied to clipboard

CORS (Cross-Origin Resource Sharing) for your Symfony/Laravel requests

Results 8 php-cors issues
Sort by recently updated
recently updated
newest added

This PR adds support for the additional CORS-headers introduced in the [Private Network Access draft](https://wicg.github.io/private-network-access/). Chrome experimenting with it, see: https://chromestatus.com/feature/5436853517811712.

Fixes: `strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in vendor/fruitcake/php-cors/src/CorsService.php on line 108`

Hi we just upgraded to Laravel 9 and PHP 8.1 and noticed the following message in the logs: `strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated...

Hello I switched to **Lumen 9.1.6**. I had composer saying that [laravel-cors](https://github.com/fruitcake/laravel-cors) has to be replaced. Currently, I have in app.php : ```

Is it necessary to include the Vary header in responses to non-CORS requests that wouldn't be cached anyway? For example, if the request is a POST or PUT request, which...

# Add Dynamic Support for Access-Control-Expose-Headers This PR implements dynamic support for the Access-Control-Expose-Headers header in php-cors, addressing the need for more flexible CORS header management in complex applications. Proposal...

## Summary This proposal aims to enhance the php-cors library by adding support for dynamic of the Access-Control-Expose-Headers header. Currently, this header is set globally, which limits flexibility in scenarios...

enhancement

I found this at `laravel 12.17.0` with `php-cors 1.3.0` path: `vendor/fruitcake/php-cors/src/CorsService.php` ``` $this->allowAllHeaders = in_array('*', $this->allowedHeaders); ``` ``` if ($this->allowAllHeaders === true) { $allowHeaders = (string) $request->headers->get('Access-Control-Request-Headers'); $this->varyHeader($response, 'Access-Control-Request-Headers'); }...