fruitcake / php-cors Goto Github PK
View Code? Open in Web Editor NEWCORS (Cross-Origin Resource Sharing) for your Symfony/Laravel requests
License: MIT License
CORS (Cross-Origin Resource Sharing) for your Symfony/Laravel requests
License: MIT License
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 in vendor/fruitcake/php-cors/src/CorsService.php on line 108
Hi. I have PHP version 8.1.3.
We have an error for updating Laravel to version 9
Root composer.json requires fruitcake/laravel-cors ^1.2.0, found fruitcake/laravel-cors
[dev-feat-lazyoptions, dev-feat-groupmiddleware, dev-test-single, dev-feat-middlewaretest,
dev-feat-actions, dev-feat-browsertests, dev-master, dev-v1-backport, dev-feat-prependmiddleware,
dev-develop, dev-barryvdh-test-laravel9,
v0.1, ..., 0.11.x-dev, v1.0.0, ..., 1.0.x-dev, v2.0.0-beta1, ..., 2.2.x-dev, v3.0.0, 3.0.x-dev
(alias of dev-master)]
but it does not match the constraint.
cors.php
to config\cors.php
bootstrap\app.php
enable configuration, add this line $app->configure('cors');
\Illuminate\Http\Middleware\HandleCors::class
to $app->middleware
x-api-key
you must add it to allowed_headers
array example: ['x-api-key']Line 141 in 98c1493
The Access-Control-Request-Methods
header exists in both singular and plural variants.
My firefox sends the plural version, and this package seams to only support the singular version.
Hello I switched to Lumen 9.1.6. I had composer saying that laravel-cors has to be replaced. Currently, I have in app.php :
<?php
$app->configure('cors');
$app->middleware([
Fruitcake\Cors\HandleCors::class,
]);
$app->register(Fruitcake\Cors\CorsServiceProvider::class);
I have replaced \Fruitcake\Cors\HandleCors::class
, with \Illuminate\Http\Middleware\HandleCors::class
but what about the service provider ?
The changelog is missing the updates for 1.3.0. Can this please be added?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.