New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] response headers (cors) #990
Comments
This package doesn't support usage of Response, as PHPExcel handles the actual download. You will have to pass the headers yourself (2nd param)
|
Please, add this to the documentation. |
Hi, i'm actually using Laravel-Excel in a Lumen project and I am trying to export data in an excel file and download it as below: My UsersExport:
My controller:
web.php: And when I'm trying to execute the excel() function i'm getting this error However, I already created a CorsMiddleware.php and add it in my bootstrap/app.php long time ago and all the other functions works very well thanks of it. app.php:
CorsMiddleware.php:
Did I forget something ? I'm stuck on it since yesterday and I really would like your help :'( Here you can see the versions of Lumen I use and also maatwebsite/excel:
Thank you! |
Package version, Laravel version
laravel 5.1
laravel-excel 2.1.0
barryvdh/laravel-cors 0.8.0
Expected behaviour
I expected that laravel-excel works fine with laravel-cors
Actual behaviour
laravel-excel ignores laravel-cors and not set in the response the
headers "Access-Control-Allow-Origin" and "Vary"
in download and export methods laravel-excel not use Illuminate\Http\Response
this is what broken all?
Steps to reproduce the behaviour
Make a request from www.example-a.com in javascript (in my case angularjs application) to www.example-b.com (server with laravel + laraver-cors + laravel-excel)
The text was updated successfully, but these errors were encountered: